ERC-721
Overview
Max Total Supply
514 GTBaby
Holders
146
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 GTBabyLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
GTBaby
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//Tes-sal pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract Gleaf { function getGiraffeLendFee(uint256 token_id) public view returns (uint256) {} function getStaker(uint256 tokenId) public view returns (address) {} } contract GTBaby is ERC721Enumerable, Ownable { using Counters for Counters.Counter; event Mint( address indexed owner, uint256 indexed tokenId, uint256 indexed collectionId ); event Collection( uint256 indexed collection_id, string indexed collection_name ); event NameChange(uint256 tokenId, string name); struct Incubator { uint256 parentId1; uint256 parentId2; uint256 childId; uint256 revealTime; uint256 collectionId; address initiatorAddress; uint256 incubationStart; } struct collectionBaseConfig { string collection_name; uint256 start_time; uint256 end_time; uint256 max_supply; bool early_access; address collection_address; uint256 total_minted; bool status; uint256 min_balance; } struct collectionWaitPeriodConfig { uint256 incubation_period; uint256 wait_period; uint256 staked_incubation_period; uint256 staked_wait_period; } struct collectionFeeConfig { uint256 staked_fee; uint256 unstaked_fee; uint256 staked_fast_incubation_fee; uint256 unstaked_fast_incubation_fee; uint256 staked_fast_availability_fee; uint256 unstaked_fast_availability_fee; } struct lastBreed { uint256 tokenId; uint256 availableTime; } mapping(string => lastBreed) public collectionToLastBreedTime; mapping(uint256 => Incubator) public tokenIdToIncubator; mapping(uint256 => uint256) public giraffeToOfffspring; mapping(uint256 => collectionBaseConfig) public collection_details; mapping(uint256 => collectionWaitPeriodConfig) public collectionWaitPeriods; mapping(uint256 => collectionFeeConfig) public collectionFees; mapping(string => bool) private _nameReserved; address public giraffetowerAddress = 0xb487A91382cD66076fc4C1AF4D7d8CE7f929A9bA; address public gleafAddress = 0x55a23fB10506B2679d0C53b4468309c7105fB16f; address nullAddress = 0x0000000000000000000000000000000000000000; bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; address private ownerAddress; string _currentBaseURI = "https://api.giraffetowernft.com/baby/"; uint256 public nameChangePrice = 10 ether; address pr = 0x044780Ef6d06BF528c03f423bF3D9d8a88837A3f; mapping(uint256 => string) giraffeName; constructor() ERC721("GTBaby", "GTBaby") { ownerAddress = msg.sender; } function setGiraffeName(uint256 tokenId, string memory name) public { require( ownerOf(tokenId) == msg.sender, "Token is not nameable by you!" ); require(validateName(name) == true, "Not a valid new name"); require( sha256(bytes(name)) != sha256(bytes(giraffeName[tokenId])), "New name is same as the current one" ); require(isNameReserved(name) == false, "Name already reserved"); uint256 allowance = IERC20(gleafAddress).allowance( msg.sender, address(this) ); require(allowance >= nameChangePrice, "Check the token allowance"); IERC20(gleafAddress).transferFrom( msg.sender, address(this), nameChangePrice ); if (pr != address(this)) { IERC20(gleafAddress).transfer(pr, nameChangePrice); } if (bytes(giraffeName[tokenId]).length > 0) { toggleReserveName(giraffeName[tokenId], false); } toggleReserveName(name, true); giraffeName[tokenId] = name; emit NameChange(tokenId, name); } function setPr(address _address) public onlyOwner { pr = _address; } /** * @dev Reserves the name if isReserve is set to true, de-reserves if set to false */ function toggleReserveName(string memory str, bool isReserve) internal { _nameReserved[toLower(str)] = isReserve; } function isNameReserved(string memory nameString) public view returns (bool) { return _nameReserved[toLower(nameString)]; } function validateName(string memory str) public pure returns (bool) { bytes memory b = bytes(str); if (b.length < 1) return false; if (b.length > 25) return false; // Cannot be longer than 25 characters if (b[0] == 0x20) return false; // Leading space if (b[b.length - 1] == 0x20) return false; // Trailing space bytes1 lastChar = b[0]; for (uint256 i; i < b.length; i++) { bytes1 char = b[i]; if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces if ( !(char >= 0x30 && char <= 0x39) && //9-0 !(char >= 0x41 && char <= 0x5A) && //A-Z !(char >= 0x61 && char <= 0x7A) && //a-z !(char == 0x20) //space ) return false; lastChar = char; } return true; } /** * @dev Converts the string to lowercase */ function toLower(string memory str) public pure returns (string memory) { bytes memory bStr = bytes(str); bytes memory bLower = new bytes(bStr.length); for (uint256 i = 0; i < bStr.length; i++) { // Uppercase character if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) { bLower[i] = bytes1(uint8(bStr[i]) + 32); } else { bLower[i] = bStr[i]; } } return string(bLower); } function getGiraffeName(uint256 tokenId) public view returns (string memory) { return giraffeName[tokenId]; } function changeNamePrice(uint256 _price) external onlyOwner { nameChangePrice = _price; } function setGiraffetowerAddress(address _giraffetowerAddress) public onlyOwner { giraffetowerAddress = _giraffetowerAddress; return; } function setBaseURI(string memory baseURI) external onlyOwner { _currentBaseURI = baseURI; } function setGleafAddress(address _gleafAddress) public onlyOwner { gleafAddress = _gleafAddress; return; } function initiateCollection( uint256 collection_id, string memory collection_name, uint256 start_time, uint256 end_time, uint256 max_supply, address collection_address, bool status, bool early_access, uint256 min_balance ) public onlyOwner { collection_details[collection_id].start_time = block.timestamp + (start_time * 1 days); collection_details[collection_id].collection_name = collection_name; collection_details[collection_id].end_time = block.timestamp + (end_time * 1 days); collection_details[collection_id].max_supply = max_supply; collection_details[collection_id] .collection_address = collection_address; collection_details[collection_id].status = status; collection_details[collection_id].early_access = early_access; collection_details[collection_id].min_balance = min_balance; emit Collection(collection_id, collection_name); } function setWaitPeriods( uint256 collection_id, uint256 wait_period, uint256 incubation_period, uint256 staked_incubation_period, uint256 staked_wait_period ) public onlyOwner { collectionWaitPeriods[collection_id] .incubation_period = incubation_period; collectionWaitPeriods[collection_id].wait_period = wait_period; collectionWaitPeriods[collection_id] .staked_incubation_period = staked_incubation_period; collectionWaitPeriods[collection_id] .staked_wait_period = staked_wait_period; } function setCollectionFees( uint256 collection_id, uint256 staked_fee, uint256 unstaked_fee, uint256 staked_fast_incubation_fee, uint256 unstaked_fast_incubation_fee, uint256 staked_fast_availability_fee, uint256 unstaked_fast_availability_fee ) public onlyOwner { collectionFees[collection_id].staked_fee = staked_fee; collectionFees[collection_id].unstaked_fee = unstaked_fee; collectionFees[collection_id] .staked_fast_incubation_fee = staked_fast_incubation_fee; collectionFees[collection_id] .unstaked_fast_incubation_fee = unstaked_fast_incubation_fee; collectionFees[collection_id] .staked_fast_availability_fee = staked_fast_availability_fee; collectionFees[collection_id] .unstaked_fast_availability_fee = unstaked_fast_availability_fee; } function setCollectionMW( uint256 collection_id, uint256 minimum_balance, address collection_address ) public onlyOwner { collection_details[collection_id].min_balance = minimum_balance; collection_details[collection_id] .collection_address = collection_address; } function setBreedingStatus(uint256 collection_id, bool status) public onlyOwner { collection_details[collection_id].status = status; } function setCollectionName( uint256 collection_id, string memory _collection_name ) public onlyOwner { collection_details[collection_id].collection_name = _collection_name; } function setBreedingEarlyAccess(uint256 collection_id, bool status) public onlyOwner { collection_details[collection_id].early_access = status; } function initiateBreeding( uint256 collection_id, uint256 _parentId1, uint256 _parentId2 ) public { Gleaf glf = Gleaf(gleafAddress); require( msg.sender == tx.origin, "Contracts not allowed to initiateBreeding" ); require( collection_details[collection_id].status == true, "Breeding is not active." ); require( collection_details[collection_id].start_time <= block.timestamp, "Breeding is has not started." ); require( collection_details[collection_id].end_time > block.timestamp, "Breeding is has ended." ); if (collection_details[collection_id].early_access == true) { //check if both parentId are staked; require( glf.getStaker(_parentId1) != nullAddress, "Only Staked Giraffe Can Breed Currently" ); require( glf.getStaker(_parentId2) != nullAddress, "Only Staked Giraffe Can Breed Currently" ); } if (collection_details[collection_id].min_balance > 0) { //check if both parentId are staked; require( IERC20(gleafAddress).balanceOf(msg.sender) >= collection_details[collection_id].min_balance, "CCMBNA" ); } require( collection_details[collection_id].total_minted < collection_details[collection_id].max_supply, "Max supply reached!" ); string memory catid1 = string( abi.encodePacked( Strings.toString(collection_id), Strings.toString(_parentId1) ) ); string memory catid2 = string( abi.encodePacked( Strings.toString(collection_id), Strings.toString(_parentId2) ) ); require( collectionToLastBreedTime[catid1].availableTime <= block.timestamp, "Parent1 not available!" ); require( collectionToLastBreedTime[catid2].availableTime <= block.timestamp, "Parent2 not available!" ); uint256[] memory _parentIdrentfee = new uint256[](2); address[] memory _parentIdowner = new address[](2); _parentIdrentfee[0] = 0; _parentIdrentfee[1] = 0; _parentIdowner[0] = nullAddress; _parentIdowner[1] = nullAddress; //Require they are the owners of both parents. if (IERC721(giraffetowerAddress).ownerOf(_parentId1) != msg.sender) { _parentIdowner[0] = glf.getStaker(_parentId1); require(_parentIdowner[0] != nullAddress, "You Don't own giraffe1"); if (_parentIdowner[0] != msg.sender) { _parentIdrentfee[0] = glf.getGiraffeLendFee(_parentId1); require(_parentIdrentfee[0] > 0, "Giraffe1 Not for Rent"); } } if (IERC721(giraffetowerAddress).ownerOf(_parentId2) != msg.sender) { _parentIdowner[1] = glf.getStaker(_parentId2); require(_parentIdowner[1] != nullAddress, "You Don't own giraffe2"); if (_parentIdowner[1] != msg.sender) { _parentIdrentfee[1] = glf.getGiraffeLendFee(_parentId2); require(_parentIdrentfee[1] > 0, "Giraffe2 Not for Rent"); } } uint256 total_rent = _parentIdrentfee[0] + _parentIdrentfee[1]; uint256 breedingFee; uint256 incubation_period; uint256 wait_period; if ( _parentIdowner[0] != nullAddress && _parentIdowner[1] != nullAddress ) { breedingFee = collectionFees[collection_id].staked_fee; incubation_period = collectionWaitPeriods[collection_id] .staked_incubation_period; wait_period = collectionWaitPeriods[collection_id] .staked_wait_period; } else { breedingFee = collectionFees[collection_id].unstaked_fee; incubation_period = collectionWaitPeriods[collection_id] .incubation_period; wait_period = collectionWaitPeriods[collection_id].wait_period; } uint256 total_fee = total_rent + breedingFee; require( IERC20(gleafAddress).allowance(msg.sender, address(this)) >= total_fee, "Check the token allowance" ); require( IERC20(gleafAddress).balanceOf(msg.sender) >= total_fee, "Insufficient Balance" ); IERC20(gleafAddress).transferFrom(msg.sender, address(this), total_fee); if (_parentIdrentfee[0] > 0) { IERC20(gleafAddress).transfer( _parentIdowner[0], _parentIdrentfee[0] ); } if (_parentIdrentfee[1] > 0) { IERC20(gleafAddress).transfer( _parentIdowner[1], _parentIdrentfee[1] ); } uint256[] memory parent_ids = new uint256[](2); uint256[] memory others = new uint256[](3); parent_ids[0] = _parentId1; parent_ids[1] = _parentId2; others[0] = breedingFee; others[1] = wait_period; others[2] = incubation_period; processBreeding(collection_id, parent_ids, others); } function processBreeding( uint256 collection_id, uint256[] memory parent_ids, uint256[] memory others ) internal { if ( collection_details[collection_id].collection_address != address(this) ) { IERC20(gleafAddress).transfer( collection_details[collection_id].collection_address, others[0] ); } uint256 _tokenId = totalSupply(); string memory catid1 = string( abi.encodePacked( Strings.toString(collection_id), Strings.toString(parent_ids[0]) ) ); string memory catid2 = string( abi.encodePacked( Strings.toString(collection_id), Strings.toString(parent_ids[1]) ) ); collectionToLastBreedTime[catid1] = lastBreed( parent_ids[0], block.timestamp + (others[1] * 1 hours) ); collectionToLastBreedTime[catid2] = lastBreed( parent_ids[1], block.timestamp + (others[1] * 1 hours) ); tokenIdToIncubator[_tokenId] = Incubator( parent_ids[0], parent_ids[1], _tokenId, block.timestamp + (others[2] * 1 hours), collection_id, msg.sender, block.timestamp ); collection_details[collection_id].total_minted += 1; giraffeToOfffspring[parent_ids[0]] += 1; giraffeToOfffspring[parent_ids[1]] += 1; //Mint them their unrevealed baby emit Mint(msg.sender, _tokenId, collection_id); _mint(msg.sender, _tokenId); } function speedUpParentAvailability(uint256 _collectionId, uint256 _tokenId) public { Gleaf glf = Gleaf(gleafAddress); string memory catid1 = string( abi.encodePacked( Strings.toString(_collectionId), Strings.toString(_tokenId) ) ); require( collectionToLastBreedTime[catid1].availableTime > block.timestamp, "Token id Supplied is available." ); uint256 speedUpFee; if (glf.getStaker(_tokenId) != nullAddress) { speedUpFee = collectionFees[_collectionId] .staked_fast_availability_fee; } else { speedUpFee = collectionFees[_collectionId] .unstaked_fast_availability_fee; } uint256 allowance = IERC20(gleafAddress).allowance( msg.sender, address(this) ); require(allowance >= speedUpFee, "Check the token allowance"); require( IERC20(gleafAddress).balanceOf(msg.sender) >= speedUpFee, "Insufficient Balance" ); IERC20(gleafAddress).transferFrom( msg.sender, address(this), speedUpFee ); if ( collection_details[_collectionId].collection_address != address(this) ) { IERC20(gleafAddress).transfer( collection_details[_collectionId].collection_address, speedUpFee ); } collectionToLastBreedTime[catid1].availableTime = block.timestamp; } function speedUpChildReveal(uint256 _tokenId, uint256 _collectionId) public { Gleaf glf = Gleaf(gleafAddress); require( tokenIdToIncubator[_tokenId].revealTime > block.timestamp, "Child Already Revealed" ); uint256 speedUpFee; if ( glf.getStaker(tokenIdToIncubator[_tokenId].parentId1) != nullAddress && glf.getStaker(tokenIdToIncubator[_tokenId].parentId2) != nullAddress ) { speedUpFee = collectionFees[_collectionId] .staked_fast_incubation_fee; } else { speedUpFee = collectionFees[_collectionId] .unstaked_fast_incubation_fee; } uint256 allowance = IERC20(gleafAddress).allowance( msg.sender, address(this) ); require(allowance >= speedUpFee, "Check the token allowance"); require( IERC20(gleafAddress).balanceOf(msg.sender) >= speedUpFee, "Insufficient Balance" ); IERC20(gleafAddress).transferFrom( msg.sender, address(this), speedUpFee ); if ( collection_details[_collectionId].collection_address != address(this) ) { IERC20(gleafAddress).transfer( collection_details[_collectionId].collection_address, speedUpFee ); } //Set the new reveal time. tokenIdToIncubator[_tokenId].revealTime = block.timestamp; } function _baseURI() internal view virtual override returns (string memory) { return _currentBaseURI; } function getParents(uint256 tokenId) public view returns (uint256[] memory) { uint256[] memory Parents = new uint256[](2); Parents[0] = tokenIdToIncubator[tokenId].parentId1; Parents[1] = tokenIdToIncubator[tokenId].parentId2; return Parents; } function isAvailable(uint256 tokenId, uint256 collectionId) public view returns (bool) { string memory catid1 = string( abi.encodePacked( Strings.toString(collectionId), Strings.toString(tokenId) ) ); if ( collectionToLastBreedTime[catid1].availableTime <= block.timestamp ) { return true; } else { return false; } } function getRevealTime(uint256 tokenId) public view returns (uint256) { return tokenIdToIncubator[tokenId].revealTime; } function isRevealed(uint256 tokenId) public view returns (bool) { if (tokenIdToIncubator[tokenId].revealTime <= block.timestamp) { return true; } else { return false; } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i; i < tokenCount; i++) { tokensId[i] = tokenOfOwnerByIndex(_owner, i); } return tokensId; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory base = _baseURI(); return string(abi.encodePacked(base, Strings.toString(tokenId), ".json")); } function withdrawFunds(uint256 amount) public onlyOwner { sendEth(ownerAddress, amount); } function sendEth(address to, uint256 amount) internal { (bool success, ) = to.call{value: amount}(""); require(success, "Failed to send ether"); } function withdrawToken( IERC20 token, address recipient, uint256 amount ) public onlyOwner { require( token.balanceOf(address(this)) >= amount, "You do not have sufficient Balance" ); token.transfer(recipient, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.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 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 pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 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 pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.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 { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //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); } /** * @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); } /** * @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 of token that is not own"); 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); } /** * @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 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 {} }
// SPDX-License-Identifier: MIT 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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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":"uint256","name":"collection_id","type":"uint256"},{"indexed":true,"internalType":"string","name":"collection_name","type":"string"}],"name":"Collection","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"collectionId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChange","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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"changeNamePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionFees","outputs":[{"internalType":"uint256","name":"staked_fee","type":"uint256"},{"internalType":"uint256","name":"unstaked_fee","type":"uint256"},{"internalType":"uint256","name":"staked_fast_incubation_fee","type":"uint256"},{"internalType":"uint256","name":"unstaked_fast_incubation_fee","type":"uint256"},{"internalType":"uint256","name":"staked_fast_availability_fee","type":"uint256"},{"internalType":"uint256","name":"unstaked_fast_availability_fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"collectionToLastBreedTime","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"availableTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionWaitPeriods","outputs":[{"internalType":"uint256","name":"incubation_period","type":"uint256"},{"internalType":"uint256","name":"wait_period","type":"uint256"},{"internalType":"uint256","name":"staked_incubation_period","type":"uint256"},{"internalType":"uint256","name":"staked_wait_period","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collection_details","outputs":[{"internalType":"string","name":"collection_name","type":"string"},{"internalType":"uint256","name":"start_time","type":"uint256"},{"internalType":"uint256","name":"end_time","type":"uint256"},{"internalType":"uint256","name":"max_supply","type":"uint256"},{"internalType":"bool","name":"early_access","type":"bool"},{"internalType":"address","name":"collection_address","type":"address"},{"internalType":"uint256","name":"total_minted","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"},{"internalType":"uint256","name":"min_balance","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":"getGiraffeName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getParents","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRevealTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"giraffeToOfffspring","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giraffetowerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gleafAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"uint256","name":"_parentId1","type":"uint256"},{"internalType":"uint256","name":"_parentId2","type":"uint256"}],"name":"initiateBreeding","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"string","name":"collection_name","type":"string"},{"internalType":"uint256","name":"start_time","type":"uint256"},{"internalType":"uint256","name":"end_time","type":"uint256"},{"internalType":"uint256","name":"max_supply","type":"uint256"},{"internalType":"address","name":"collection_address","type":"address"},{"internalType":"bool","name":"status","type":"bool"},{"internalType":"bool","name":"early_access","type":"bool"},{"internalType":"uint256","name":"min_balance","type":"uint256"}],"name":"initiateCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"collectionId","type":"uint256"}],"name":"isAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nameString","type":"string"}],"name":"isNameReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameChangePrice","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":"renounceOwnership","outputs":[],"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":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setBreedingEarlyAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setBreedingStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"uint256","name":"staked_fee","type":"uint256"},{"internalType":"uint256","name":"unstaked_fee","type":"uint256"},{"internalType":"uint256","name":"staked_fast_incubation_fee","type":"uint256"},{"internalType":"uint256","name":"unstaked_fast_incubation_fee","type":"uint256"},{"internalType":"uint256","name":"staked_fast_availability_fee","type":"uint256"},{"internalType":"uint256","name":"unstaked_fast_availability_fee","type":"uint256"}],"name":"setCollectionFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"uint256","name":"minimum_balance","type":"uint256"},{"internalType":"address","name":"collection_address","type":"address"}],"name":"setCollectionMW","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"string","name":"_collection_name","type":"string"}],"name":"setCollectionName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"name":"setGiraffeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_giraffetowerAddress","type":"address"}],"name":"setGiraffetowerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gleafAddress","type":"address"}],"name":"setGleafAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setPr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collection_id","type":"uint256"},{"internalType":"uint256","name":"wait_period","type":"uint256"},{"internalType":"uint256","name":"incubation_period","type":"uint256"},{"internalType":"uint256","name":"staked_incubation_period","type":"uint256"},{"internalType":"uint256","name":"staked_wait_period","type":"uint256"}],"name":"setWaitPeriods","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_collectionId","type":"uint256"}],"name":"speedUpChildReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"speedUpParentAvailability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"toLower","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToIncubator","outputs":[{"internalType":"uint256","name":"parentId1","type":"uint256"},{"internalType":"uint256","name":"parentId2","type":"uint256"},{"internalType":"uint256","name":"childId","type":"uint256"},{"internalType":"uint256","name":"revealTime","type":"uint256"},{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"address","name":"initiatorAddress","type":"address"},{"internalType":"uint256","name":"incubationStart","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
601280546001600160a01b031990811673b487a91382cd66076fc4c1af4d7d8ce7f929a9ba179091556013805482167355a23fb10506b2679d0c53b4468309c7105fb16f17905560148054909116905560e0604052602560808181529062005dd760a039805162000079916016916020909101906200019c565b50678ac7230489e80000601755601880546001600160a01b03191673044780ef6d06bf528c03f423bf3d9d8a88837a3f179055348015620000b957600080fd5b5060408051808201825260068082526547544261627960d01b602080840182815285518087019096529285528401528151919291620000fb916000916200019c565b508051620001119060019060208401906200019c565b5050506200012e620001286200014660201b60201c565b6200014a565b601580546001600160a01b031916331790556200027f565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001aa9062000242565b90600052602060002090601f016020900481019282620001ce576000855562000219565b82601f10620001e957805160ff191683800117855562000219565b8280016001018555821562000219579182015b8281111562000219578251825591602001919060010190620001fc565b50620002279291506200022b565b5090565b5b808211156200022757600081556001016200022c565b600181811c908216806200025757607f821691505b602082108114156200027957634e487b7160e01b600052602260045260246000fd5b50919050565b615b48806200028f6000396000f3fe608060405234801561001057600080fd5b506004361061035d5760003560e01c80636352211e116101d3578063b88d4fde11610104578063e0f3270e116100a2578063e985e9c51161007c578063e985e9c5146108ca578063ebb85d2914610906578063f2fde38b14610919578063fbf1d18c1461092c5761035d565b8063e0f3270e14610881578063e2545fdd14610894578063e34a5d1c146108a75761035d565b8063c755379f116100de578063c755379f14610801578063c87b56dd14610814578063cc371bf314610827578063dbbd584e1461083a5761035d565b8063b88d4fde146107c8578063c4b6b11d146107db578063c5800cbf146107ee5761035d565b8063911228931161017157806395d89b411161014b57806395d89b411461070857806397ff69ac146107105780639ffdb65a146107a2578063a22cb465146107b55761035d565b806391122893146106cf5780639416b423146106e257806394ea3f24146106f55761035d565b80637a959172116101ad5780637a9591721461067857806383456c931461069857806387e0457f146106ab5780638da5cb5b146106be5761035d565b80636352211e1461064a57806370a082311461065d578063715018a6146106705761035d565b8063242a0087116102ad578063438b63001161024b5780634f6ccce7116102255780634f6ccce7146105fe5780635055fbc3146106115780635293cf241461062457806355f804b3146106375761035d565b8063438b63001461058d57806345ca7738146105a05780634c140d25146105a95761035d565b80633bd2ad8a116102875780633bd2ad8a146104e45780633d2b4a011461055457806341475e3e1461056757806342842e0e1461057a5761035d565b8063242a00871461048957806324d88f80146104a95780632f745c59146104d15761035d565b8063095ea7b31161031a57806317f6060d116102f457806317f6060d1461043e57806318160ddd1461045157806321793b731461046357806323b872dd146104765761035d565b8063095ea7b314610405578063155dd5ee1461041857806315b56d101461042b5761035d565b806301b22ab11461036257806301e336671461037757806301ffc9a71461038a57806305ebd130146103b257806306fdde03146103c5578063081812fc146103da575b600080fd5b61037561037036600461546c565b61093f565b005b610375610385366004615191565b610dc8565b61039d6103983660046152da565b610f4c565b60405190151581526020015b60405180910390f35b6103756103c036600461535d565b610f79565b6103cd610fc6565b6040516103a9919061576b565b6103ed6103e8366004615345565b611058565b6040516001600160a01b0390911681526020016103a9565b61037561041336600461527b565b6110ed565b610375610426366004615345565b611203565b61039d610439366004615312565b611246565b61037561044c3660046154f0565b61127a565b6008545b6040519081526020016103a9565b61037561047136600461546c565b6112cc565b610375610484366004615191565b6116f4565b61049c610497366004615345565b611725565b6040516103a99190615727565b6104bc6104b7366004615345565b6117ce565b6040516103a99998979695949392919061577e565b6104556104df36600461527b565b6118b0565b6105276104f2366004615345565b601060205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016103a9565b6103756105623660046154c5565b611949565b6013546103ed906001600160a01b031681565b610375610588366004615191565b612cad565b61049c61059b366004615121565b612cc8565b61045560175481565b6105de6105b7366004615345565b600f6020526000908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016103a9565b61045561060c366004615345565b612d86565b61039d61061f366004615345565b612e27565b610375610632366004615121565b612e4f565b610375610645366004615312565b612e99565b6103ed610658366004615345565b612eda565b61045561066b366004615121565b612f51565b610375612fd8565b610455610686366004615345565b600d6020526000908152604090205481565b6103756106a6366004615121565b61300e565b6103756106b93660046153c6565b61305a565b600a546001600160a01b03166103ed565b6103756106dd36600461548d565b613188565b6103cd6106f0366004615312565b6131f2565b6012546103ed906001600160a01b031681565b6103cd6133af565b61076461071e366004615345565b600c602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290916001600160a01b03169087565b60408051978852602088019690965294860193909352606085019190915260808401526001600160a01b031660a083015260c082015260e0016103a9565b61039d6107b0366004615312565b6133be565b6103756107c336600461524e565b61360b565b6103756107d63660046151d1565b6136dd565b6103cd6107e9366004615345565b61370f565b6103756107fc366004615381565b6137b1565b61037561080f366004615381565b613cb3565b6103cd610822366004615345565b613cfc565b610375610835366004615345565b613db9565b61086c610848366004615312565b8051602081830181018051600b825292820191909301209152805460019091015482565b604080519283526020830191909152016103a9565b61037561088f36600461535d565b613de8565b6103756108a2366004615121565b613e35565b6104556108b5366004615345565b6000908152600c602052604090206003015490565b61039d6108d8366004615159565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61037561091436600461552a565b613e7f565b610375610927366004615121565b613edb565b61039d61093a36600461546c565b613f73565b6013546000838152600c60205260409020600301546001600160a01b039091169042106109ac5760405162461bcd60e51b815260206004820152601660248201527510da1a5b1908105b1c9958591e4814995d99585b195960521b60448201526064015b60405180910390fd5b6014546000848152600c60205260408082205490516371e4cc7f60e11b8152600481019190915290916001600160a01b03908116919084169063e3c998fe9060240160206040518083038186803b158015610a0657600080fd5b505afa158015610a1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3e919061513d565b6001600160a01b031614158015610aef57506014546000858152600c6020526040908190206001015490516371e4cc7f60e11b815260048101919091526001600160a01b039182169184169063e3c998fe9060240160206040518083038186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae3919061513d565b6001600160a01b031614155b15610b0c5750600082815260106020526040902060020154610b20565b506000828152601060205260409020600301545b601354604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015610b6a57600080fd5b505afa158015610b7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba291906152c2565b905081811015610bc45760405162461bcd60e51b81526004016109a390615876565b6013546040516370a0823160e01b815233600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015610c0757600080fd5b505afa158015610c1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3f91906152c2565b1015610c5d5760405162461bcd60e51b81526004016109a3906158e2565b6013546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610c91903390309087906004016156c6565b602060405180830381600087803b158015610cab57600080fd5b505af1158015610cbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce391906152a6565b506000848152600e602052604090206004015461010090046001600160a01b03163014610dad576013546000858152600e602052604090819020600490810154915163a9059cbb60e01b81526001600160a01b036101009093048316918101919091526024810185905291169063a9059cbb90604401602060405180830381600087803b158015610d7357600080fd5b505af1158015610d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dab91906152a6565b505b505050600091825250600c6020526040902042600390910155565b600a546001600160a01b03163314610df25760405162461bcd60e51b81526004016109a3906158ad565b6040516370a0823160e01b815230600482015281906001600160a01b038516906370a082319060240160206040518083038186803b158015610e3357600080fd5b505afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b91906152c2565b1015610ec45760405162461bcd60e51b815260206004820152602260248201527f596f7520646f206e6f7420686176652073756666696369656e742042616c616e604482015261636560f01b60648201526084016109a3565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb90604401602060405180830381600087803b158015610f0e57600080fd5b505af1158015610f22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4691906152a6565b50505050565b60006001600160e01b0319821663780e9d6360e01b1480610f715750610f7182613fe6565b90505b919050565b600a546001600160a01b03163314610fa35760405162461bcd60e51b81526004016109a3906158ad565b6000918252600e6020526040909120600401805460ff1916911515919091179055565b606060008054610fd590615a2d565b80601f016020809104026020016040519081016040528092919081815260200182805461100190615a2d565b801561104e5780601f106110235761010080835404028352916020019161104e565b820191906000526020600020905b81548152906001019060200180831161103157829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166110d15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109a3565b506000908152600460205260409020546001600160a01b031690565b60006110f882612eda565b9050806001600160a01b0316836001600160a01b031614156111665760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109a3565b336001600160a01b0382161480611182575061118281336108d8565b6111f45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109a3565b6111fe8383614036565b505050565b600a546001600160a01b0316331461122d5760405162461bcd60e51b81526004016109a3906158ad565b601554611243906001600160a01b0316826140a4565b50565b60006011611253836131f2565b60405161126091906155a1565b9081526040519081900360200190205460ff169050919050565b600a546001600160a01b031633146112a45760405162461bcd60e51b81526004016109a3906158ad565b6000948552600f60205260409094209182556001820192909255600281019190915560030155565b6013546001600160a01b031660006112e38461413e565b6112ec8461413e565b6040516020016112fd929190615658565b604051602081830303815290604052905042600b8260405161131f91906155a1565b9081526020016040518091039020600101541161137e5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e20696420537570706c69656420697320617661696c61626c652e0060448201526064016109a3565b6014546040516371e4cc7f60e11b8152600481018590526000916001600160a01b03908116919085169063e3c998fe9060240160206040518083038186803b1580156113c957600080fd5b505afa1580156113dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611401919061513d565b6001600160a01b031614611427575060008481526010602052604090206004015461143b565b506000848152601060205260409020600501545b601354604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561148557600080fd5b505afa158015611499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114bd91906152c2565b9050818110156114df5760405162461bcd60e51b81526004016109a390615876565b6013546040516370a0823160e01b815233600482015283916001600160a01b0316906370a082319060240160206040518083038186803b15801561152257600080fd5b505afa158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a91906152c2565b10156115785760405162461bcd60e51b81526004016109a3906158e2565b6013546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906115ac903390309087906004016156c6565b602060405180830381600087803b1580156115c657600080fd5b505af11580156115da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fe91906152a6565b506000868152600e602052604090206004015461010090046001600160a01b031630146116c8576013546000878152600e602052604090819020600490810154915163a9059cbb60e01b81526001600160a01b036101009093048316918101919091526024810185905291169063a9059cbb90604401602060405180830381600087803b15801561168e57600080fd5b505af11580156116a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c691906152a6565b505b42600b846040516116d991906155a1565b90815260405190819003602001902060010155505050505050565b6116fe3382614261565b61171a5760405162461bcd60e51b81526004016109a390615910565b6111fe838383614354565b604080516002808252606080830184529260009291906020830190803683375050506000848152600c602052604081205482519293509183919061177957634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600c600084815260200190815260200160002060010154816001815181106117bd57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b600e602052600090815260409020805481906117e990615a2d565b80601f016020809104026020016040519081016040528092919081815260200182805461181590615a2d565b80156118625780601f1061183757610100808354040283529160200191611862565b820191906000526020600020905b81548152906001019060200180831161184557829003601f168201915b5050505060018301546002840154600385015460048601546005870154600688015460079098015496979496939550919360ff808316946101009093046001600160a01b0316939291169089565b60006118bb83612f51565b821061191d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109a3565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b6013546001600160a01b03163332146119b65760405162461bcd60e51b815260206004820152602960248201527f436f6e747261637473206e6f7420616c6c6f77656420746f20696e6974696174604482015268654272656564696e6760b81b60648201526084016109a3565b6000848152600e602052604090206006015460ff161515600114611a1c5760405162461bcd60e51b815260206004820152601760248201527f4272656564696e67206973206e6f74206163746976652e00000000000000000060448201526064016109a3565b6000848152600e6020526040902060010154421015611a7d5760405162461bcd60e51b815260206004820152601c60248201527f4272656564696e6720697320686173206e6f7420737461727465642e0000000060448201526064016109a3565b6000848152600e60205260409020600201544210611ad65760405162461bcd60e51b8152602060048201526016602482015275213932b2b234b7339034b9903430b99032b73232b21760511b60448201526064016109a3565b6000848152600e602052604090206004015460ff16151560011415611c41576014546040516371e4cc7f60e11b8152600481018590526001600160a01b039182169183169063e3c998fe9060240160206040518083038186803b158015611b3c57600080fd5b505afa158015611b50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b74919061513d565b6001600160a01b03161415611b9b5760405162461bcd60e51b81526004016109a3906157dd565b6014546040516371e4cc7f60e11b8152600481018490526001600160a01b039182169183169063e3c998fe9060240160206040518083038186803b158015611be257600080fd5b505afa158015611bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1a919061513d565b6001600160a01b03161415611c415760405162461bcd60e51b81526004016109a3906157dd565b6000848152600e602052604090206007015415611d1d576000848152600e6020526040908190206007015460135491516370a0823160e01b815233600482015290916001600160a01b0316906370a082319060240160206040518083038186803b158015611cae57600080fd5b505afa158015611cc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce691906152c2565b1015611d1d5760405162461bcd60e51b815260206004820152600660248201526543434d424e4160d01b60448201526064016109a3565b6000848152600e60205260409020600381015460059091015410611d795760405162461bcd60e51b81526020600482015260136024820152724d617820737570706c7920726561636865642160681b60448201526064016109a3565b6000611d848561413e565b611d8d8561413e565b604051602001611d9e929190615658565b60405160208183030381529060405290506000611dba8661413e565b611dc38561413e565b604051602001611dd4929190615658565b604051602081830303815290604052905042600b83604051611df691906155a1565b9081526020016040518091039020600101541115611e4f5760405162461bcd60e51b8152602060048201526016602482015275506172656e7431206e6f7420617661696c61626c652160501b60448201526064016109a3565b42600b82604051611e6091906155a1565b9081526020016040518091039020600101541115611eb95760405162461bcd60e51b8152602060048201526016602482015275506172656e7432206e6f7420617661696c61626c652160501b60448201526064016109a3565b604080516002808252606082018352600092602083019080368337505060408051600280825260608201835293945060009390925090602083019080368337019050509050600082600081518110611f2157634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600082600181518110611f5057634e487b7160e01b600052603260045260246000fd5b602090810291909101015260145481516001600160a01b03909116908290600090611f8b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152601454825191169082906001908110611fca57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526012546040516331a9108f60e11b8152600481018a905233929190911690636352211e9060240160206040518083038186803b15801561201f57600080fd5b505afa158015612033573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612057919061513d565b6001600160a01b0316146122e9576040516371e4cc7f60e11b8152600481018890526001600160a01b0386169063e3c998fe9060240160206040518083038186803b1580156120a557600080fd5b505afa1580156120b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120dd919061513d565b816000815181106120fe57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014548251911690829060009061213b57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156121935760405162461bcd60e51b8152602060048201526016602482015275596f7520446f6e2774206f776e20676972616666653160501b60448201526064016109a3565b336001600160a01b0316816000815181106121be57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316146122e9576040516333fe4b1d60e11b8152600481018890526001600160a01b038616906367fc963a9060240160206040518083038186803b15801561221457600080fd5b505afa158015612228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224c91906152c2565b8260008151811061226d57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060008260008151811061229c57634e487b7160e01b600052603260045260246000fd5b6020026020010151116122e95760405162461bcd60e51b815260206004820152601560248201527411da5c985999994c48139bdd08199bdc8814995b9d605a1b60448201526064016109a3565b6012546040516331a9108f60e11b81526004810188905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561232d57600080fd5b505afa158015612341573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612365919061513d565b6001600160a01b0316146125f9576040516371e4cc7f60e11b8152600481018790526001600160a01b0386169063e3c998fe9060240160206040518083038186803b1580156123b357600080fd5b505afa1580156123c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123eb919061513d565b8160018151811061240c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260145482519116908290600190811061244b57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156124a35760405162461bcd60e51b81526020600482015260166024820152752cb7ba902237b713ba1037bbb71033b4b930b333329960511b60448201526064016109a3565b336001600160a01b0316816001815181106124ce57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316146125f9576040516333fe4b1d60e11b8152600481018790526001600160a01b038616906367fc963a9060240160206040518083038186803b15801561252457600080fd5b505afa158015612538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255c91906152c2565b8260018151811061257d57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506000826001815181106125ac57634e487b7160e01b600052603260045260246000fd5b6020026020010151116125f95760405162461bcd60e51b815260206004820152601560248201527411da5c985999994c88139bdd08199bdc8814995b9d605a1b60448201526064016109a3565b60008260018151811061261c57634e487b7160e01b600052603260045260246000fd5b60200260200101518360008151811061264557634e487b7160e01b600052603260045260246000fd5b6020026020010151612657919061597a565b90506000806000601460009054906101000a90046001600160a01b03166001600160a01b03168560008151811061269e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141580156126fe575060145485516001600160a01b0390911690869060019081106126ea57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614155b1561273057505050600089815260106020908152604080832054600f909252909120600281015460039091015461275a565b5050506000898152601060209081526040808320600190810154600f909352922080549201549091905b6000612766848661597a565b601354604051636eb1769f60e11b815233600482015230602482015291925082916001600160a01b039091169063dd62ed3e9060440160206040518083038186803b1580156127b457600080fd5b505afa1580156127c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ec91906152c2565b101561280a5760405162461bcd60e51b81526004016109a390615876565b6013546040516370a0823160e01b815233600482015282916001600160a01b0316906370a082319060240160206040518083038186803b15801561284d57600080fd5b505afa158015612861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288591906152c2565b10156128a35760405162461bcd60e51b81526004016109a3906158e2565b6013546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906128d7903390309086906004016156c6565b602060405180830381600087803b1580156128f157600080fd5b505af1158015612905573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292991906152a6565b5060008760008151811061294d57634e487b7160e01b600052603260045260246000fd5b60200260200101511115612a475760135486516001600160a01b039091169063a9059cbb90889060009061299157634e487b7160e01b600052603260045260246000fd5b6020026020010151896000815181106129ba57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016129f39291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b158015612a0d57600080fd5b505af1158015612a21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4591906152a6565b505b600087600181518110612a6a57634e487b7160e01b600052603260045260246000fd5b60200260200101511115612b665760135486516001600160a01b039091169063a9059cbb9088906001908110612ab057634e487b7160e01b600052603260045260246000fd5b602002602001015189600181518110612ad957634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612b129291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b158015612b2c57600080fd5b505af1158015612b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b6491906152a6565b505b6040805160028082526060820183526000926020830190803683375050604080516003808252608082019092529293506000929150602082016060803683370190505090508d82600081518110612bcd57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508c82600181518110612bfb57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508581600081518110612c2957634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508381600181518110612c5757634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508481600281518110612c8557634e487b7160e01b600052603260045260246000fd5b602002602001018181525050612c9c8f83836144ff565b505050505050505050505050505050565b6111fe838383604051806020016040528060008152506136dd565b60606000612cd583612f51565b905060008167ffffffffffffffff811115612d0057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612d29578160200160208202803683370190505b50905060005b82811015612d7e57612d4185826118b0565b828281518110612d6157634e487b7160e01b600052603260045260246000fd5b602090810291909101015280612d7681615a68565b915050612d2f565b509392505050565b6000612d9160085490565b8210612df45760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109a3565b60088281548110612e1557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600c60205260408120600301544210612e4757506001610f74565b506000610f74565b600a546001600160a01b03163314612e795760405162461bcd60e51b81526004016109a3906158ad565b601280546001600160a01b0383166001600160a01b031990911617905550565b600a546001600160a01b03163314612ec35760405162461bcd60e51b81526004016109a3906158ad565b8051612ed6906016906020840190614fec565b5050565b6000818152600260205260408120546001600160a01b031680610f715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109a3565b60006001600160a01b038216612fbc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109a3565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146130025760405162461bcd60e51b81526004016109a3906158ad565b61300c6000614a54565b565b600a546001600160a01b031633146130385760405162461bcd60e51b81526004016109a3906158ad565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031633146130845760405162461bcd60e51b81526004016109a3906158ad565b61309187620151806159cb565b61309b904261597a565b60008a8152600e60209081526040909120600181019290925589516130c392918b0190614fec565b506130d186620151806159cb565b6130db904261597a565b60008a8152600e60205260409081902060028101929092556003820187905560048201805460068401805460ff19908116891515179091556001600160a81b03199091166101006001600160a01b038a16029091161785151517905560079091018290555161314b9089906155a1565b604051908190038120908a907fbd545cf89f1d03bcb9c8a717c49fd16f73d796f5883a7754252b716697ab323990600090a3505050505050505050565b600a546001600160a01b031633146131b25760405162461bcd60e51b81526004016109a3906158ad565b6000928352600e6020526040909220600781019190915560040180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b606060008290506000815167ffffffffffffffff81111561322357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561324d576020820181803683370190505b50905060005b8251811015612d7e57604183828151811061327e57634e487b7160e01b600052603260045260246000fd5b016020015160f81c108015906132bc5750605a8382815181106132b157634e487b7160e01b600052603260045260246000fd5b016020015160f81c11155b1561333a578281815181106132e157634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60206132fb9190615992565b60f81b82828151811061331e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061339d565b82818151811061335a57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b82828151811061338557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b806133a781615a68565b915050613253565b606060018054610fd590615a2d565b6000808290506001815110156133d8576000915050610f74565b6019815111156133ec576000915050610f74565b8060008151811061340d57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415613432576000915050610f74565b806001825161344191906159ea565b8151811061345f57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415613484576000915050610f74565b6000816000815181106134a757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b82518110156136005760008382815181106134e657634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b811480156135175750600160fd1b6001600160f81b03198416145b15613529576000945050505050610f74565b600360fc1b6001600160f81b03198216108015906135555750603960f81b6001600160f81b0319821611155b15801561358b5750604160f81b6001600160f81b03198216108015906135895750602d60f91b6001600160f81b0319821611155b155b80156135c05750606160f81b6001600160f81b03198216108015906135be5750603d60f91b6001600160f81b0319821611155b155b80156135da5750600160fd1b6001600160f81b0319821614155b156135ec576000945050505050610f74565b9150806135f881615a68565b9150506134bb565b506001949350505050565b6001600160a01b0382163314156136645760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109a3565b3360008181526005602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516136d1911515815260200190565b60405180910390a35050565b6136e73383614261565b6137035760405162461bcd60e51b81526004016109a390615910565b610f4684848484614aa6565b600081815260196020526040902080546060919061372c90615a2d565b80601f016020809104026020016040519081016040528092919081815260200182805461375890615a2d565b80156137a55780601f1061377a576101008083540402835291602001916137a5565b820191906000526020600020905b81548152906001019060200180831161378857829003601f168201915b50505050509050919050565b336137bb83612eda565b6001600160a01b0316146138115760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e206973206e6f74206e616d6561626c6520627920796f752100000060448201526064016109a3565b61381a816133be565b15156001146138625760405162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c6964206e6577206e616d6560601b60448201526064016109a3565b600082815260196020526040908190209051600291613880916155bd565b602060405180830381855afa15801561389d573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906138c091906152c2565b6002826040516138d091906155a1565b602060405180830381855afa1580156138ed573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061391091906152c2565b141561396a5760405162461bcd60e51b815260206004820152602360248201527f4e6577206e616d652069732073616d65206173207468652063757272656e74206044820152626f6e6560e81b60648201526084016109a3565b61397381611246565b156139b85760405162461bcd60e51b815260206004820152601560248201527413985b5948185b1c9958591e481c995cd95c9d9959605a1b60448201526064016109a3565b601354604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015613a0257600080fd5b505afa158015613a16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a3a91906152c2565b9050601754811015613a5e5760405162461bcd60e51b81526004016109a390615876565b6013546017546040516323b872dd60e01b81526001600160a01b03909216916323b872dd91613a9391339130916004016156c6565b602060405180830381600087803b158015613aad57600080fd5b505af1158015613ac1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae591906152a6565b506018546001600160a01b03163014613b865760135460185460175460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb90604401602060405180830381600087803b158015613b4c57600080fd5b505af1158015613b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b8491906152a6565b505b60008381526019602052604081208054613b9f90615a2d565b90501115613c4a5760008381526019602052604090208054613c4a9190613bc590615a2d565b80601f0160208091040260200160405190810160405280929190818152602001828054613bf190615a2d565b8015613c3e5780601f10613c1357610100808354040283529160200191613c3e565b820191906000526020600020905b815481529060010190602001808311613c2157829003601f168201915b50505050506000614ad9565b613c55826001614ad9565b60008381526019602090815260409091208351613c7492850190614fec565b507f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b8383604051613ca6929190615961565b60405180910390a1505050565b600a546001600160a01b03163314613cdd5760405162461bcd60e51b81526004016109a3906158ad565b6000828152600e6020908152604090912082516111fe92840190614fec565b6000818152600260205260409020546060906001600160a01b0316613d7b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109a3565b6000613d85614b16565b905080613d918461413e565b604051602001613da2929190615687565b604051602081830303815290604052915050919050565b600a546001600160a01b03163314613de35760405162461bcd60e51b81526004016109a3906158ad565b601755565b600a546001600160a01b03163314613e125760405162461bcd60e51b81526004016109a3906158ad565b6000918252600e6020526040909120600601805460ff1916911515919091179055565b600a546001600160a01b03163314613e5f5760405162461bcd60e51b81526004016109a3906158ad565b601380546001600160a01b0383166001600160a01b031990911617905550565b600a546001600160a01b03163314613ea95760405162461bcd60e51b81526004016109a3906158ad565b600096875260106020526040909620948555600185019390935560028401919091556003830155600482015560050155565b600a546001600160a01b03163314613f055760405162461bcd60e51b81526004016109a3906158ad565b6001600160a01b038116613f6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109a3565b61124381614a54565b600080613f7f8361413e565b613f888561413e565b604051602001613f99929190615658565b604051602081830303815290604052905042600b82604051613fbb91906155a1565b90815260200160405180910390206001015411613fdc576001915050611943565b6000915050611943565b60006001600160e01b031982166380ac58cd60e01b148061401757506001600160e01b03198216635b5e139f60e01b145b80610f7157506301ffc9a760e01b6001600160e01b0319831614610f71565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061406b82612eda565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146140f1576040519150601f19603f3d011682016040523d82523d6000602084013e6140f6565b606091505b50509050806111fe5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321032ba3432b960611b60448201526064016109a3565b60608161416357506040805180820190915260018152600360fc1b6020820152610f74565b8160005b811561418d578061417781615a68565b91506141869050600a836159b7565b9150614167565b60008167ffffffffffffffff8111156141b657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156141e0576020820181803683370190505b5090505b8415614259576141f56001836159ea565b9150614202600a86615a83565b61420d90603061597a565b60f81b81838151811061423057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350614252600a866159b7565b94506141e4565b949350505050565b6000818152600260205260408120546001600160a01b03166142da5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109a3565b60006142e583612eda565b9050806001600160a01b0316846001600160a01b031614806143205750836001600160a01b031661431584611058565b6001600160a01b0316145b8061425957506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16614259565b826001600160a01b031661436782612eda565b6001600160a01b0316146143cf5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016109a3565b6001600160a01b0382166144315760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109a3565b61443c838383614b25565b614447600082614036565b6001600160a01b03831660009081526003602052604081208054600192906144709084906159ea565b90915550506001600160a01b038216600090815260036020526040812080546001929061449e90849061597a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000838152600e602052604090206004015461010090046001600160a01b031630146145ff576013546000848152600e602052604081206004015483516001600160a01b039384169363a9059cbb936101009093041691859161457257634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016145ab9291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b1580156145c557600080fd5b505af11580156145d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145fd91906152a6565b505b600061460a60085490565b905060006146178561413e565b6146488560008151811061463b57634e487b7160e01b600052603260045260246000fd5b602002602001015161413e565b604051602001614659929190615658565b604051602081830303815290604052905060006146758661413e565b6146998660018151811061463b57634e487b7160e01b600052603260045260246000fd5b6040516020016146aa929190615658565b60405160208183030381529060405290506040518060400160405280866000815181106146e757634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018560018151811061471557634e487b7160e01b600052603260045260246000fd5b6020026020010151610e1061472a91906159cb565b614734904261597a565b815250600b8360405161474791906155a1565b908152604080519182900360209081018320845181559301516001938401558181019052865190918291889190811061479057634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001856001815181106147be57634e487b7160e01b600052603260045260246000fd5b6020026020010151610e106147d391906159cb565b6147dd904261597a565b815250600b826040516147f091906155a1565b908152602001604051809103902060008201518160000155602082015181600101559050506040518060e001604052808660008151811061484157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018660018151811061486f57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001848152602001856002815181106148a357634e487b7160e01b600052603260045260246000fd5b6020026020010151610e106148b891906159cb565b6148c2904261597a565b8152602080820189905233604080840191909152426060938401526000878152600c835281812085518155858401516001808301919091558684015160028301559486015160038201556080860151600482015560a0860151600580830180546001600160a01b0319166001600160a01b039093169290921790915560c0909601516006909101558a8152600e909252812090920180549192909161496890849061597a565b925050819055506001600d60008760008151811061499657634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546149bb919061597a565b925050819055506001600d6000876001815181106149e957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254614a0e919061597a565b90915550506040518690849033907f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f90600090a4614a4c3384614be2565b505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b614ab1848484614354565b614abd84848484614d30565b610f465760405162461bcd60e51b81526004016109a390615824565b806011614ae5846131f2565b604051614af291906155a1565b908152604051908190036020019020805491151560ff199092169190911790555050565b606060168054610fd590615a2d565b6001600160a01b038316614b8057614b7b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614ba3565b816001600160a01b0316836001600160a01b031614614ba357614ba38382614e32565b6001600160a01b038216614bbf57614bba81614ecf565b6111fe565b826001600160a01b0316826001600160a01b0316146111fe576111fe8282614fa8565b6001600160a01b038216614c385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109a3565b6000818152600260205260409020546001600160a01b031615614c9d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109a3565b614ca960008383614b25565b6001600160a01b0382166000908152600360205260408120805460019290614cd290849061597a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561360057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614d749033908990889088906004016156ea565b602060405180830381600087803b158015614d8e57600080fd5b505af1925050508015614dbe575060408051601f3d908101601f19168201909252614dbb918101906152f6565b60015b614e18573d808015614dec576040519150601f19603f3d011682016040523d82523d6000602084013e614df1565b606091505b508051614e105760405162461bcd60e51b81526004016109a390615824565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050614259565b60006001614e3f84612f51565b614e4991906159ea565b600083815260076020526040902054909150808214614e9c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090614ee1906001906159ea565b60008381526009602052604081205460088054939450909284908110614f1757634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110614f4657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614f8c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000614fb383612f51565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054614ff890615a2d565b90600052602060002090601f01602090048101928261501a5760008555615060565b82601f1061503357805160ff1916838001178555615060565b82800160010185558215615060579182015b82811115615060578251825591602001919060010190615045565b5061506c929150615070565b5090565b5b8082111561506c5760008155600101615071565b600067ffffffffffffffff808411156150a0576150a0615ac3565b604051601f8501601f19908116603f011681019082821181831017156150c8576150c8615ac3565b816040528093508581528686860111156150e157600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261510b578081fd5b61511a83833560208501615085565b9392505050565b600060208284031215615132578081fd5b813561511a81615ad9565b60006020828403121561514e578081fd5b815161511a81615ad9565b6000806040838503121561516b578081fd5b823561517681615ad9565b9150602083013561518681615ad9565b809150509250929050565b6000806000606084860312156151a5578081fd5b83356151b081615ad9565b925060208401356151c081615ad9565b929592945050506040919091013590565b600080600080608085870312156151e6578081fd5b84356151f181615ad9565b9350602085013561520181615ad9565b925060408501359150606085013567ffffffffffffffff811115615223578182fd5b8501601f81018713615233578182fd5b61524287823560208401615085565b91505092959194509250565b60008060408385031215615260578182fd5b823561526b81615ad9565b9150602083013561518681615aee565b6000806040838503121561528d578182fd5b823561529881615ad9565b946020939093013593505050565b6000602082840312156152b7578081fd5b815161511a81615aee565b6000602082840312156152d3578081fd5b5051919050565b6000602082840312156152eb578081fd5b813561511a81615afc565b600060208284031215615307578081fd5b815161511a81615afc565b600060208284031215615323578081fd5b813567ffffffffffffffff811115615339578182fd5b614259848285016150fb565b600060208284031215615356578081fd5b5035919050565b6000806040838503121561536f578182fd5b82359150602083013561518681615aee565b60008060408385031215615393578182fd5b82359150602083013567ffffffffffffffff8111156153b0578182fd5b6153bc858286016150fb565b9150509250929050565b60008060008060008060008060006101208a8c0312156153e4578687fd5b8935985060208a013567ffffffffffffffff811115615401578788fd5b61540d8c828d016150fb565b98505060408a0135965060608a0135955060808a0135945060a08a013561543381615ad9565b935060c08a013561544381615aee565b925060e08a013561545381615aee565b809250506101008a013590509295985092959850929598565b6000806040838503121561547e578182fd5b50508035926020909101359150565b6000806000606084860312156154a1578081fd5b833592506020840135915060408401356154ba81615ad9565b809150509250925092565b6000806000606084860312156154d9578081fd5b505081359360208301359350604090920135919050565b600080600080600060a08688031215615507578283fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600080600080600060e0888a031215615544578081fd5b505085359760208701359750604087013596606081013596506080810135955060a0810135945060c0013592509050565b6000815180845261558d816020860160208601615a01565b601f01601f19169290920160200192915050565b600082516155b3818460208701615a01565b9190910192915050565b600080835482600182811c9150808316806155d957607f831692505b60208084108214156155f957634e487b7160e01b87526022600452602487fd5b81801561560d576001811461561e5761564a565b60ff1986168952848901965061564a565b60008a815260209020885b868110156156425781548b820152908501908301615629565b505084890196505b509498975050505050505050565b6000835161566a818460208801615a01565b83519083019061567e818360208801615a01565b01949350505050565b60008351615699818460208801615a01565b8351908301906156ad818360208801615a01565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061571d90830184615575565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561575f57835183529284019291840191600101615743565b50909695505050505050565b60006020825261511a6020830184615575565b60006101208083526157928184018d615575565b602084019b909b5250506040810197909752606087019590955292151560808601526001600160a01b039190911660a085015260c0840152151560e083015261010090910152919050565b60208082526027908201527f4f6e6c79205374616b656420476972616666652043616e2042726565642043756040820152667272656e746c7960c81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f436865636b2074686520746f6b656e20616c6c6f77616e636500000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260149082015273496e73756666696369656e742042616c616e636560601b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000838252604060208301526142596040830184615575565b6000821982111561598d5761598d615a97565b500190565b600060ff821660ff84168060ff038211156159af576159af615a97565b019392505050565b6000826159c6576159c6615aad565b500490565b60008160001904831182151516156159e5576159e5615a97565b500290565b6000828210156159fc576159fc615a97565b500390565b60005b83811015615a1c578181015183820152602001615a04565b83811115610f465750506000910152565b600181811c90821680615a4157607f821691505b60208210811415615a6257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615a7c57615a7c615a97565b5060010190565b600082615a9257615a92615aad565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461124357600080fd5b801515811461124357600080fd5b6001600160e01b03198116811461124357600080fdfea26469706673582212203d5dc00e72c15a6c936d5ff9036a16e8bae76662cdd261d92c47f1370f719d4d64736f6c6343000803003368747470733a2f2f6170692e67697261666665746f7765726e66742e636f6d2f626162792f
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061035d5760003560e01c80636352211e116101d3578063b88d4fde11610104578063e0f3270e116100a2578063e985e9c51161007c578063e985e9c5146108ca578063ebb85d2914610906578063f2fde38b14610919578063fbf1d18c1461092c5761035d565b8063e0f3270e14610881578063e2545fdd14610894578063e34a5d1c146108a75761035d565b8063c755379f116100de578063c755379f14610801578063c87b56dd14610814578063cc371bf314610827578063dbbd584e1461083a5761035d565b8063b88d4fde146107c8578063c4b6b11d146107db578063c5800cbf146107ee5761035d565b8063911228931161017157806395d89b411161014b57806395d89b411461070857806397ff69ac146107105780639ffdb65a146107a2578063a22cb465146107b55761035d565b806391122893146106cf5780639416b423146106e257806394ea3f24146106f55761035d565b80637a959172116101ad5780637a9591721461067857806383456c931461069857806387e0457f146106ab5780638da5cb5b146106be5761035d565b80636352211e1461064a57806370a082311461065d578063715018a6146106705761035d565b8063242a0087116102ad578063438b63001161024b5780634f6ccce7116102255780634f6ccce7146105fe5780635055fbc3146106115780635293cf241461062457806355f804b3146106375761035d565b8063438b63001461058d57806345ca7738146105a05780634c140d25146105a95761035d565b80633bd2ad8a116102875780633bd2ad8a146104e45780633d2b4a011461055457806341475e3e1461056757806342842e0e1461057a5761035d565b8063242a00871461048957806324d88f80146104a95780632f745c59146104d15761035d565b8063095ea7b31161031a57806317f6060d116102f457806317f6060d1461043e57806318160ddd1461045157806321793b731461046357806323b872dd146104765761035d565b8063095ea7b314610405578063155dd5ee1461041857806315b56d101461042b5761035d565b806301b22ab11461036257806301e336671461037757806301ffc9a71461038a57806305ebd130146103b257806306fdde03146103c5578063081812fc146103da575b600080fd5b61037561037036600461546c565b61093f565b005b610375610385366004615191565b610dc8565b61039d6103983660046152da565b610f4c565b60405190151581526020015b60405180910390f35b6103756103c036600461535d565b610f79565b6103cd610fc6565b6040516103a9919061576b565b6103ed6103e8366004615345565b611058565b6040516001600160a01b0390911681526020016103a9565b61037561041336600461527b565b6110ed565b610375610426366004615345565b611203565b61039d610439366004615312565b611246565b61037561044c3660046154f0565b61127a565b6008545b6040519081526020016103a9565b61037561047136600461546c565b6112cc565b610375610484366004615191565b6116f4565b61049c610497366004615345565b611725565b6040516103a99190615727565b6104bc6104b7366004615345565b6117ce565b6040516103a99998979695949392919061577e565b6104556104df36600461527b565b6118b0565b6105276104f2366004615345565b601060205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909186565b604080519687526020870195909552938501929092526060840152608083015260a082015260c0016103a9565b6103756105623660046154c5565b611949565b6013546103ed906001600160a01b031681565b610375610588366004615191565b612cad565b61049c61059b366004615121565b612cc8565b61045560175481565b6105de6105b7366004615345565b600f6020526000908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080016103a9565b61045561060c366004615345565b612d86565b61039d61061f366004615345565b612e27565b610375610632366004615121565b612e4f565b610375610645366004615312565b612e99565b6103ed610658366004615345565b612eda565b61045561066b366004615121565b612f51565b610375612fd8565b610455610686366004615345565b600d6020526000908152604090205481565b6103756106a6366004615121565b61300e565b6103756106b93660046153c6565b61305a565b600a546001600160a01b03166103ed565b6103756106dd36600461548d565b613188565b6103cd6106f0366004615312565b6131f2565b6012546103ed906001600160a01b031681565b6103cd6133af565b61076461071e366004615345565b600c602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293919290916001600160a01b03169087565b60408051978852602088019690965294860193909352606085019190915260808401526001600160a01b031660a083015260c082015260e0016103a9565b61039d6107b0366004615312565b6133be565b6103756107c336600461524e565b61360b565b6103756107d63660046151d1565b6136dd565b6103cd6107e9366004615345565b61370f565b6103756107fc366004615381565b6137b1565b61037561080f366004615381565b613cb3565b6103cd610822366004615345565b613cfc565b610375610835366004615345565b613db9565b61086c610848366004615312565b8051602081830181018051600b825292820191909301209152805460019091015482565b604080519283526020830191909152016103a9565b61037561088f36600461535d565b613de8565b6103756108a2366004615121565b613e35565b6104556108b5366004615345565b6000908152600c602052604090206003015490565b61039d6108d8366004615159565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61037561091436600461552a565b613e7f565b610375610927366004615121565b613edb565b61039d61093a36600461546c565b613f73565b6013546000838152600c60205260409020600301546001600160a01b039091169042106109ac5760405162461bcd60e51b815260206004820152601660248201527510da1a5b1908105b1c9958591e4814995d99585b195960521b60448201526064015b60405180910390fd5b6014546000848152600c60205260408082205490516371e4cc7f60e11b8152600481019190915290916001600160a01b03908116919084169063e3c998fe9060240160206040518083038186803b158015610a0657600080fd5b505afa158015610a1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3e919061513d565b6001600160a01b031614158015610aef57506014546000858152600c6020526040908190206001015490516371e4cc7f60e11b815260048101919091526001600160a01b039182169184169063e3c998fe9060240160206040518083038186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae3919061513d565b6001600160a01b031614155b15610b0c5750600082815260106020526040902060020154610b20565b506000828152601060205260409020600301545b601354604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015610b6a57600080fd5b505afa158015610b7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba291906152c2565b905081811015610bc45760405162461bcd60e51b81526004016109a390615876565b6013546040516370a0823160e01b815233600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015610c0757600080fd5b505afa158015610c1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3f91906152c2565b1015610c5d5760405162461bcd60e51b81526004016109a3906158e2565b6013546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610c91903390309087906004016156c6565b602060405180830381600087803b158015610cab57600080fd5b505af1158015610cbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce391906152a6565b506000848152600e602052604090206004015461010090046001600160a01b03163014610dad576013546000858152600e602052604090819020600490810154915163a9059cbb60e01b81526001600160a01b036101009093048316918101919091526024810185905291169063a9059cbb90604401602060405180830381600087803b158015610d7357600080fd5b505af1158015610d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dab91906152a6565b505b505050600091825250600c6020526040902042600390910155565b600a546001600160a01b03163314610df25760405162461bcd60e51b81526004016109a3906158ad565b6040516370a0823160e01b815230600482015281906001600160a01b038516906370a082319060240160206040518083038186803b158015610e3357600080fd5b505afa158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b91906152c2565b1015610ec45760405162461bcd60e51b815260206004820152602260248201527f596f7520646f206e6f7420686176652073756666696369656e742042616c616e604482015261636560f01b60648201526084016109a3565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb90604401602060405180830381600087803b158015610f0e57600080fd5b505af1158015610f22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4691906152a6565b50505050565b60006001600160e01b0319821663780e9d6360e01b1480610f715750610f7182613fe6565b90505b919050565b600a546001600160a01b03163314610fa35760405162461bcd60e51b81526004016109a3906158ad565b6000918252600e6020526040909120600401805460ff1916911515919091179055565b606060008054610fd590615a2d565b80601f016020809104026020016040519081016040528092919081815260200182805461100190615a2d565b801561104e5780601f106110235761010080835404028352916020019161104e565b820191906000526020600020905b81548152906001019060200180831161103157829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166110d15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109a3565b506000908152600460205260409020546001600160a01b031690565b60006110f882612eda565b9050806001600160a01b0316836001600160a01b031614156111665760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109a3565b336001600160a01b0382161480611182575061118281336108d8565b6111f45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109a3565b6111fe8383614036565b505050565b600a546001600160a01b0316331461122d5760405162461bcd60e51b81526004016109a3906158ad565b601554611243906001600160a01b0316826140a4565b50565b60006011611253836131f2565b60405161126091906155a1565b9081526040519081900360200190205460ff169050919050565b600a546001600160a01b031633146112a45760405162461bcd60e51b81526004016109a3906158ad565b6000948552600f60205260409094209182556001820192909255600281019190915560030155565b6013546001600160a01b031660006112e38461413e565b6112ec8461413e565b6040516020016112fd929190615658565b604051602081830303815290604052905042600b8260405161131f91906155a1565b9081526020016040518091039020600101541161137e5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e20696420537570706c69656420697320617661696c61626c652e0060448201526064016109a3565b6014546040516371e4cc7f60e11b8152600481018590526000916001600160a01b03908116919085169063e3c998fe9060240160206040518083038186803b1580156113c957600080fd5b505afa1580156113dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611401919061513d565b6001600160a01b031614611427575060008481526010602052604090206004015461143b565b506000848152601060205260409020600501545b601354604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561148557600080fd5b505afa158015611499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114bd91906152c2565b9050818110156114df5760405162461bcd60e51b81526004016109a390615876565b6013546040516370a0823160e01b815233600482015283916001600160a01b0316906370a082319060240160206040518083038186803b15801561152257600080fd5b505afa158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a91906152c2565b10156115785760405162461bcd60e51b81526004016109a3906158e2565b6013546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906115ac903390309087906004016156c6565b602060405180830381600087803b1580156115c657600080fd5b505af11580156115da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fe91906152a6565b506000868152600e602052604090206004015461010090046001600160a01b031630146116c8576013546000878152600e602052604090819020600490810154915163a9059cbb60e01b81526001600160a01b036101009093048316918101919091526024810185905291169063a9059cbb90604401602060405180830381600087803b15801561168e57600080fd5b505af11580156116a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c691906152a6565b505b42600b846040516116d991906155a1565b90815260405190819003602001902060010155505050505050565b6116fe3382614261565b61171a5760405162461bcd60e51b81526004016109a390615910565b6111fe838383614354565b604080516002808252606080830184529260009291906020830190803683375050506000848152600c602052604081205482519293509183919061177957634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600c600084815260200190815260200160002060010154816001815181106117bd57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b600e602052600090815260409020805481906117e990615a2d565b80601f016020809104026020016040519081016040528092919081815260200182805461181590615a2d565b80156118625780601f1061183757610100808354040283529160200191611862565b820191906000526020600020905b81548152906001019060200180831161184557829003601f168201915b5050505060018301546002840154600385015460048601546005870154600688015460079098015496979496939550919360ff808316946101009093046001600160a01b0316939291169089565b60006118bb83612f51565b821061191d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109a3565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b6013546001600160a01b03163332146119b65760405162461bcd60e51b815260206004820152602960248201527f436f6e747261637473206e6f7420616c6c6f77656420746f20696e6974696174604482015268654272656564696e6760b81b60648201526084016109a3565b6000848152600e602052604090206006015460ff161515600114611a1c5760405162461bcd60e51b815260206004820152601760248201527f4272656564696e67206973206e6f74206163746976652e00000000000000000060448201526064016109a3565b6000848152600e6020526040902060010154421015611a7d5760405162461bcd60e51b815260206004820152601c60248201527f4272656564696e6720697320686173206e6f7420737461727465642e0000000060448201526064016109a3565b6000848152600e60205260409020600201544210611ad65760405162461bcd60e51b8152602060048201526016602482015275213932b2b234b7339034b9903430b99032b73232b21760511b60448201526064016109a3565b6000848152600e602052604090206004015460ff16151560011415611c41576014546040516371e4cc7f60e11b8152600481018590526001600160a01b039182169183169063e3c998fe9060240160206040518083038186803b158015611b3c57600080fd5b505afa158015611b50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b74919061513d565b6001600160a01b03161415611b9b5760405162461bcd60e51b81526004016109a3906157dd565b6014546040516371e4cc7f60e11b8152600481018490526001600160a01b039182169183169063e3c998fe9060240160206040518083038186803b158015611be257600080fd5b505afa158015611bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1a919061513d565b6001600160a01b03161415611c415760405162461bcd60e51b81526004016109a3906157dd565b6000848152600e602052604090206007015415611d1d576000848152600e6020526040908190206007015460135491516370a0823160e01b815233600482015290916001600160a01b0316906370a082319060240160206040518083038186803b158015611cae57600080fd5b505afa158015611cc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce691906152c2565b1015611d1d5760405162461bcd60e51b815260206004820152600660248201526543434d424e4160d01b60448201526064016109a3565b6000848152600e60205260409020600381015460059091015410611d795760405162461bcd60e51b81526020600482015260136024820152724d617820737570706c7920726561636865642160681b60448201526064016109a3565b6000611d848561413e565b611d8d8561413e565b604051602001611d9e929190615658565b60405160208183030381529060405290506000611dba8661413e565b611dc38561413e565b604051602001611dd4929190615658565b604051602081830303815290604052905042600b83604051611df691906155a1565b9081526020016040518091039020600101541115611e4f5760405162461bcd60e51b8152602060048201526016602482015275506172656e7431206e6f7420617661696c61626c652160501b60448201526064016109a3565b42600b82604051611e6091906155a1565b9081526020016040518091039020600101541115611eb95760405162461bcd60e51b8152602060048201526016602482015275506172656e7432206e6f7420617661696c61626c652160501b60448201526064016109a3565b604080516002808252606082018352600092602083019080368337505060408051600280825260608201835293945060009390925090602083019080368337019050509050600082600081518110611f2157634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600082600181518110611f5057634e487b7160e01b600052603260045260246000fd5b602090810291909101015260145481516001600160a01b03909116908290600090611f8b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152601454825191169082906001908110611fca57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526012546040516331a9108f60e11b8152600481018a905233929190911690636352211e9060240160206040518083038186803b15801561201f57600080fd5b505afa158015612033573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612057919061513d565b6001600160a01b0316146122e9576040516371e4cc7f60e11b8152600481018890526001600160a01b0386169063e3c998fe9060240160206040518083038186803b1580156120a557600080fd5b505afa1580156120b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120dd919061513d565b816000815181106120fe57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014548251911690829060009061213b57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156121935760405162461bcd60e51b8152602060048201526016602482015275596f7520446f6e2774206f776e20676972616666653160501b60448201526064016109a3565b336001600160a01b0316816000815181106121be57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316146122e9576040516333fe4b1d60e11b8152600481018890526001600160a01b038616906367fc963a9060240160206040518083038186803b15801561221457600080fd5b505afa158015612228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224c91906152c2565b8260008151811061226d57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060008260008151811061229c57634e487b7160e01b600052603260045260246000fd5b6020026020010151116122e95760405162461bcd60e51b815260206004820152601560248201527411da5c985999994c48139bdd08199bdc8814995b9d605a1b60448201526064016109a3565b6012546040516331a9108f60e11b81526004810188905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561232d57600080fd5b505afa158015612341573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612365919061513d565b6001600160a01b0316146125f9576040516371e4cc7f60e11b8152600481018790526001600160a01b0386169063e3c998fe9060240160206040518083038186803b1580156123b357600080fd5b505afa1580156123c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123eb919061513d565b8160018151811061240c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260145482519116908290600190811061244b57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156124a35760405162461bcd60e51b81526020600482015260166024820152752cb7ba902237b713ba1037bbb71033b4b930b333329960511b60448201526064016109a3565b336001600160a01b0316816001815181106124ce57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316146125f9576040516333fe4b1d60e11b8152600481018790526001600160a01b038616906367fc963a9060240160206040518083038186803b15801561252457600080fd5b505afa158015612538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255c91906152c2565b8260018151811061257d57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250506000826001815181106125ac57634e487b7160e01b600052603260045260246000fd5b6020026020010151116125f95760405162461bcd60e51b815260206004820152601560248201527411da5c985999994c88139bdd08199bdc8814995b9d605a1b60448201526064016109a3565b60008260018151811061261c57634e487b7160e01b600052603260045260246000fd5b60200260200101518360008151811061264557634e487b7160e01b600052603260045260246000fd5b6020026020010151612657919061597a565b90506000806000601460009054906101000a90046001600160a01b03166001600160a01b03168560008151811061269e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141580156126fe575060145485516001600160a01b0390911690869060019081106126ea57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614155b1561273057505050600089815260106020908152604080832054600f909252909120600281015460039091015461275a565b5050506000898152601060209081526040808320600190810154600f909352922080549201549091905b6000612766848661597a565b601354604051636eb1769f60e11b815233600482015230602482015291925082916001600160a01b039091169063dd62ed3e9060440160206040518083038186803b1580156127b457600080fd5b505afa1580156127c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ec91906152c2565b101561280a5760405162461bcd60e51b81526004016109a390615876565b6013546040516370a0823160e01b815233600482015282916001600160a01b0316906370a082319060240160206040518083038186803b15801561284d57600080fd5b505afa158015612861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288591906152c2565b10156128a35760405162461bcd60e51b81526004016109a3906158e2565b6013546040516323b872dd60e01b81526001600160a01b03909116906323b872dd906128d7903390309086906004016156c6565b602060405180830381600087803b1580156128f157600080fd5b505af1158015612905573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061292991906152a6565b5060008760008151811061294d57634e487b7160e01b600052603260045260246000fd5b60200260200101511115612a475760135486516001600160a01b039091169063a9059cbb90889060009061299157634e487b7160e01b600052603260045260246000fd5b6020026020010151896000815181106129ba57634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016129f39291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b158015612a0d57600080fd5b505af1158015612a21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4591906152a6565b505b600087600181518110612a6a57634e487b7160e01b600052603260045260246000fd5b60200260200101511115612b665760135486516001600160a01b039091169063a9059cbb9088906001908110612ab057634e487b7160e01b600052603260045260246000fd5b602002602001015189600181518110612ad957634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b8152600401612b129291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b158015612b2c57600080fd5b505af1158015612b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b6491906152a6565b505b6040805160028082526060820183526000926020830190803683375050604080516003808252608082019092529293506000929150602082016060803683370190505090508d82600081518110612bcd57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508c82600181518110612bfb57634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508581600081518110612c2957634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508381600181518110612c5757634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508481600281518110612c8557634e487b7160e01b600052603260045260246000fd5b602002602001018181525050612c9c8f83836144ff565b505050505050505050505050505050565b6111fe838383604051806020016040528060008152506136dd565b60606000612cd583612f51565b905060008167ffffffffffffffff811115612d0057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612d29578160200160208202803683370190505b50905060005b82811015612d7e57612d4185826118b0565b828281518110612d6157634e487b7160e01b600052603260045260246000fd5b602090810291909101015280612d7681615a68565b915050612d2f565b509392505050565b6000612d9160085490565b8210612df45760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109a3565b60088281548110612e1557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600c60205260408120600301544210612e4757506001610f74565b506000610f74565b600a546001600160a01b03163314612e795760405162461bcd60e51b81526004016109a3906158ad565b601280546001600160a01b0383166001600160a01b031990911617905550565b600a546001600160a01b03163314612ec35760405162461bcd60e51b81526004016109a3906158ad565b8051612ed6906016906020840190614fec565b5050565b6000818152600260205260408120546001600160a01b031680610f715760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109a3565b60006001600160a01b038216612fbc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109a3565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146130025760405162461bcd60e51b81526004016109a3906158ad565b61300c6000614a54565b565b600a546001600160a01b031633146130385760405162461bcd60e51b81526004016109a3906158ad565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031633146130845760405162461bcd60e51b81526004016109a3906158ad565b61309187620151806159cb565b61309b904261597a565b60008a8152600e60209081526040909120600181019290925589516130c392918b0190614fec565b506130d186620151806159cb565b6130db904261597a565b60008a8152600e60205260409081902060028101929092556003820187905560048201805460068401805460ff19908116891515179091556001600160a81b03199091166101006001600160a01b038a16029091161785151517905560079091018290555161314b9089906155a1565b604051908190038120908a907fbd545cf89f1d03bcb9c8a717c49fd16f73d796f5883a7754252b716697ab323990600090a3505050505050505050565b600a546001600160a01b031633146131b25760405162461bcd60e51b81526004016109a3906158ad565b6000928352600e6020526040909220600781019190915560040180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b606060008290506000815167ffffffffffffffff81111561322357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561324d576020820181803683370190505b50905060005b8251811015612d7e57604183828151811061327e57634e487b7160e01b600052603260045260246000fd5b016020015160f81c108015906132bc5750605a8382815181106132b157634e487b7160e01b600052603260045260246000fd5b016020015160f81c11155b1561333a578281815181106132e157634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c60206132fb9190615992565b60f81b82828151811061331e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061339d565b82818151811061335a57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b82828151811061338557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b806133a781615a68565b915050613253565b606060018054610fd590615a2d565b6000808290506001815110156133d8576000915050610f74565b6019815111156133ec576000915050610f74565b8060008151811061340d57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415613432576000915050610f74565b806001825161344191906159ea565b8151811061345f57634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b1415613484576000915050610f74565b6000816000815181106134a757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b82518110156136005760008382815181106134e657634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b811480156135175750600160fd1b6001600160f81b03198416145b15613529576000945050505050610f74565b600360fc1b6001600160f81b03198216108015906135555750603960f81b6001600160f81b0319821611155b15801561358b5750604160f81b6001600160f81b03198216108015906135895750602d60f91b6001600160f81b0319821611155b155b80156135c05750606160f81b6001600160f81b03198216108015906135be5750603d60f91b6001600160f81b0319821611155b155b80156135da5750600160fd1b6001600160f81b0319821614155b156135ec576000945050505050610f74565b9150806135f881615a68565b9150506134bb565b506001949350505050565b6001600160a01b0382163314156136645760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109a3565b3360008181526005602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516136d1911515815260200190565b60405180910390a35050565b6136e73383614261565b6137035760405162461bcd60e51b81526004016109a390615910565b610f4684848484614aa6565b600081815260196020526040902080546060919061372c90615a2d565b80601f016020809104026020016040519081016040528092919081815260200182805461375890615a2d565b80156137a55780601f1061377a576101008083540402835291602001916137a5565b820191906000526020600020905b81548152906001019060200180831161378857829003601f168201915b50505050509050919050565b336137bb83612eda565b6001600160a01b0316146138115760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e206973206e6f74206e616d6561626c6520627920796f752100000060448201526064016109a3565b61381a816133be565b15156001146138625760405162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c6964206e6577206e616d6560601b60448201526064016109a3565b600082815260196020526040908190209051600291613880916155bd565b602060405180830381855afa15801561389d573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906138c091906152c2565b6002826040516138d091906155a1565b602060405180830381855afa1580156138ed573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061391091906152c2565b141561396a5760405162461bcd60e51b815260206004820152602360248201527f4e6577206e616d652069732073616d65206173207468652063757272656e74206044820152626f6e6560e81b60648201526084016109a3565b61397381611246565b156139b85760405162461bcd60e51b815260206004820152601560248201527413985b5948185b1c9958591e481c995cd95c9d9959605a1b60448201526064016109a3565b601354604051636eb1769f60e11b81523360048201523060248201526000916001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015613a0257600080fd5b505afa158015613a16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a3a91906152c2565b9050601754811015613a5e5760405162461bcd60e51b81526004016109a390615876565b6013546017546040516323b872dd60e01b81526001600160a01b03909216916323b872dd91613a9391339130916004016156c6565b602060405180830381600087803b158015613aad57600080fd5b505af1158015613ac1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae591906152a6565b506018546001600160a01b03163014613b865760135460185460175460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb90604401602060405180830381600087803b158015613b4c57600080fd5b505af1158015613b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b8491906152a6565b505b60008381526019602052604081208054613b9f90615a2d565b90501115613c4a5760008381526019602052604090208054613c4a9190613bc590615a2d565b80601f0160208091040260200160405190810160405280929190818152602001828054613bf190615a2d565b8015613c3e5780601f10613c1357610100808354040283529160200191613c3e565b820191906000526020600020905b815481529060010190602001808311613c2157829003601f168201915b50505050506000614ad9565b613c55826001614ad9565b60008381526019602090815260409091208351613c7492850190614fec565b507f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b8383604051613ca6929190615961565b60405180910390a1505050565b600a546001600160a01b03163314613cdd5760405162461bcd60e51b81526004016109a3906158ad565b6000828152600e6020908152604090912082516111fe92840190614fec565b6000818152600260205260409020546060906001600160a01b0316613d7b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109a3565b6000613d85614b16565b905080613d918461413e565b604051602001613da2929190615687565b604051602081830303815290604052915050919050565b600a546001600160a01b03163314613de35760405162461bcd60e51b81526004016109a3906158ad565b601755565b600a546001600160a01b03163314613e125760405162461bcd60e51b81526004016109a3906158ad565b6000918252600e6020526040909120600601805460ff1916911515919091179055565b600a546001600160a01b03163314613e5f5760405162461bcd60e51b81526004016109a3906158ad565b601380546001600160a01b0383166001600160a01b031990911617905550565b600a546001600160a01b03163314613ea95760405162461bcd60e51b81526004016109a3906158ad565b600096875260106020526040909620948555600185019390935560028401919091556003830155600482015560050155565b600a546001600160a01b03163314613f055760405162461bcd60e51b81526004016109a3906158ad565b6001600160a01b038116613f6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109a3565b61124381614a54565b600080613f7f8361413e565b613f888561413e565b604051602001613f99929190615658565b604051602081830303815290604052905042600b82604051613fbb91906155a1565b90815260200160405180910390206001015411613fdc576001915050611943565b6000915050611943565b60006001600160e01b031982166380ac58cd60e01b148061401757506001600160e01b03198216635b5e139f60e01b145b80610f7157506301ffc9a760e01b6001600160e01b0319831614610f71565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061406b82612eda565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146140f1576040519150601f19603f3d011682016040523d82523d6000602084013e6140f6565b606091505b50509050806111fe5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321032ba3432b960611b60448201526064016109a3565b60608161416357506040805180820190915260018152600360fc1b6020820152610f74565b8160005b811561418d578061417781615a68565b91506141869050600a836159b7565b9150614167565b60008167ffffffffffffffff8111156141b657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156141e0576020820181803683370190505b5090505b8415614259576141f56001836159ea565b9150614202600a86615a83565b61420d90603061597a565b60f81b81838151811061423057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350614252600a866159b7565b94506141e4565b949350505050565b6000818152600260205260408120546001600160a01b03166142da5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109a3565b60006142e583612eda565b9050806001600160a01b0316846001600160a01b031614806143205750836001600160a01b031661431584611058565b6001600160a01b0316145b8061425957506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16614259565b826001600160a01b031661436782612eda565b6001600160a01b0316146143cf5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016109a3565b6001600160a01b0382166144315760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109a3565b61443c838383614b25565b614447600082614036565b6001600160a01b03831660009081526003602052604081208054600192906144709084906159ea565b90915550506001600160a01b038216600090815260036020526040812080546001929061449e90849061597a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000838152600e602052604090206004015461010090046001600160a01b031630146145ff576013546000848152600e602052604081206004015483516001600160a01b039384169363a9059cbb936101009093041691859161457257634e487b7160e01b600052603260045260246000fd5b60200260200101516040518363ffffffff1660e01b81526004016145ab9291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b1580156145c557600080fd5b505af11580156145d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145fd91906152a6565b505b600061460a60085490565b905060006146178561413e565b6146488560008151811061463b57634e487b7160e01b600052603260045260246000fd5b602002602001015161413e565b604051602001614659929190615658565b604051602081830303815290604052905060006146758661413e565b6146998660018151811061463b57634e487b7160e01b600052603260045260246000fd5b6040516020016146aa929190615658565b60405160208183030381529060405290506040518060400160405280866000815181106146e757634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018560018151811061471557634e487b7160e01b600052603260045260246000fd5b6020026020010151610e1061472a91906159cb565b614734904261597a565b815250600b8360405161474791906155a1565b908152604080519182900360209081018320845181559301516001938401558181019052865190918291889190811061479057634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001856001815181106147be57634e487b7160e01b600052603260045260246000fd5b6020026020010151610e106147d391906159cb565b6147dd904261597a565b815250600b826040516147f091906155a1565b908152602001604051809103902060008201518160000155602082015181600101559050506040518060e001604052808660008151811061484157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018660018151811061486f57634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001848152602001856002815181106148a357634e487b7160e01b600052603260045260246000fd5b6020026020010151610e106148b891906159cb565b6148c2904261597a565b8152602080820189905233604080840191909152426060938401526000878152600c835281812085518155858401516001808301919091558684015160028301559486015160038201556080860151600482015560a0860151600580830180546001600160a01b0319166001600160a01b039093169290921790915560c0909601516006909101558a8152600e909252812090920180549192909161496890849061597a565b925050819055506001600d60008760008151811061499657634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546149bb919061597a565b925050819055506001600d6000876001815181106149e957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254614a0e919061597a565b90915550506040518690849033907f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f90600090a4614a4c3384614be2565b505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b614ab1848484614354565b614abd84848484614d30565b610f465760405162461bcd60e51b81526004016109a390615824565b806011614ae5846131f2565b604051614af291906155a1565b908152604051908190036020019020805491151560ff199092169190911790555050565b606060168054610fd590615a2d565b6001600160a01b038316614b8057614b7b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614ba3565b816001600160a01b0316836001600160a01b031614614ba357614ba38382614e32565b6001600160a01b038216614bbf57614bba81614ecf565b6111fe565b826001600160a01b0316826001600160a01b0316146111fe576111fe8282614fa8565b6001600160a01b038216614c385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109a3565b6000818152600260205260409020546001600160a01b031615614c9d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109a3565b614ca960008383614b25565b6001600160a01b0382166000908152600360205260408120805460019290614cd290849061597a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561360057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614d749033908990889088906004016156ea565b602060405180830381600087803b158015614d8e57600080fd5b505af1925050508015614dbe575060408051601f3d908101601f19168201909252614dbb918101906152f6565b60015b614e18573d808015614dec576040519150601f19603f3d011682016040523d82523d6000602084013e614df1565b606091505b508051614e105760405162461bcd60e51b81526004016109a390615824565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050614259565b60006001614e3f84612f51565b614e4991906159ea565b600083815260076020526040902054909150808214614e9c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090614ee1906001906159ea565b60008381526009602052604081205460088054939450909284908110614f1757634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110614f4657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614f8c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000614fb383612f51565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054614ff890615a2d565b90600052602060002090601f01602090048101928261501a5760008555615060565b82601f1061503357805160ff1916838001178555615060565b82800160010185558215615060579182015b82811115615060578251825591602001919060010190615045565b5061506c929150615070565b5090565b5b8082111561506c5760008155600101615071565b600067ffffffffffffffff808411156150a0576150a0615ac3565b604051601f8501601f19908116603f011681019082821181831017156150c8576150c8615ac3565b816040528093508581528686860111156150e157600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261510b578081fd5b61511a83833560208501615085565b9392505050565b600060208284031215615132578081fd5b813561511a81615ad9565b60006020828403121561514e578081fd5b815161511a81615ad9565b6000806040838503121561516b578081fd5b823561517681615ad9565b9150602083013561518681615ad9565b809150509250929050565b6000806000606084860312156151a5578081fd5b83356151b081615ad9565b925060208401356151c081615ad9565b929592945050506040919091013590565b600080600080608085870312156151e6578081fd5b84356151f181615ad9565b9350602085013561520181615ad9565b925060408501359150606085013567ffffffffffffffff811115615223578182fd5b8501601f81018713615233578182fd5b61524287823560208401615085565b91505092959194509250565b60008060408385031215615260578182fd5b823561526b81615ad9565b9150602083013561518681615aee565b6000806040838503121561528d578182fd5b823561529881615ad9565b946020939093013593505050565b6000602082840312156152b7578081fd5b815161511a81615aee565b6000602082840312156152d3578081fd5b5051919050565b6000602082840312156152eb578081fd5b813561511a81615afc565b600060208284031215615307578081fd5b815161511a81615afc565b600060208284031215615323578081fd5b813567ffffffffffffffff811115615339578182fd5b614259848285016150fb565b600060208284031215615356578081fd5b5035919050565b6000806040838503121561536f578182fd5b82359150602083013561518681615aee565b60008060408385031215615393578182fd5b82359150602083013567ffffffffffffffff8111156153b0578182fd5b6153bc858286016150fb565b9150509250929050565b60008060008060008060008060006101208a8c0312156153e4578687fd5b8935985060208a013567ffffffffffffffff811115615401578788fd5b61540d8c828d016150fb565b98505060408a0135965060608a0135955060808a0135945060a08a013561543381615ad9565b935060c08a013561544381615aee565b925060e08a013561545381615aee565b809250506101008a013590509295985092959850929598565b6000806040838503121561547e578182fd5b50508035926020909101359150565b6000806000606084860312156154a1578081fd5b833592506020840135915060408401356154ba81615ad9565b809150509250925092565b6000806000606084860312156154d9578081fd5b505081359360208301359350604090920135919050565b600080600080600060a08688031215615507578283fd5b505083359560208501359550604085013594606081013594506080013592509050565b600080600080600080600060e0888a031215615544578081fd5b505085359760208701359750604087013596606081013596506080810135955060a0810135945060c0013592509050565b6000815180845261558d816020860160208601615a01565b601f01601f19169290920160200192915050565b600082516155b3818460208701615a01565b9190910192915050565b600080835482600182811c9150808316806155d957607f831692505b60208084108214156155f957634e487b7160e01b87526022600452602487fd5b81801561560d576001811461561e5761564a565b60ff1986168952848901965061564a565b60008a815260209020885b868110156156425781548b820152908501908301615629565b505084890196505b509498975050505050505050565b6000835161566a818460208801615a01565b83519083019061567e818360208801615a01565b01949350505050565b60008351615699818460208801615a01565b8351908301906156ad818360208801615a01565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061571d90830184615575565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561575f57835183529284019291840191600101615743565b50909695505050505050565b60006020825261511a6020830184615575565b60006101208083526157928184018d615575565b602084019b909b5250506040810197909752606087019590955292151560808601526001600160a01b039190911660a085015260c0840152151560e083015261010090910152919050565b60208082526027908201527f4f6e6c79205374616b656420476972616666652043616e2042726565642043756040820152667272656e746c7960c81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f436865636b2074686520746f6b656e20616c6c6f77616e636500000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260149082015273496e73756666696369656e742042616c616e636560601b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000838252604060208301526142596040830184615575565b6000821982111561598d5761598d615a97565b500190565b600060ff821660ff84168060ff038211156159af576159af615a97565b019392505050565b6000826159c6576159c6615aad565b500490565b60008160001904831182151516156159e5576159e5615a97565b500290565b6000828210156159fc576159fc615a97565b500390565b60005b83811015615a1c578181015183820152602001615a04565b83811115610f465750506000910152565b600181811c90821680615a4157607f821691505b60208210811415615a6257634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615a7c57615a7c615a97565b5060010190565b600082615a9257615a92615aad565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461124357600080fd5b801515811461124357600080fd5b6001600160e01b03198116811461124357600080fdfea26469706673582212203d5dc00e72c15a6c936d5ff9036a16e8bae76662cdd261d92c47f1370f719d4d64736f6c63430008030033
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.