Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
1,875 PATH
Holders
536
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 PATHLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Path
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "./PathHelper.sol"; /** Path Dao */ contract Path is ERC721Enumerable, ERC721URIStorage, VRFConsumerBase, Ownable, PathHelper { using Counters for Counters.Counter; Counters.Counter private _tokenIds; bool public saleStarted = false; bool public whitelistedSale = false; struct PathToken { uint8 template; uint8 pathCount; uint8 windTurbulence; uint32 pathSeed; uint32 windSeed; } uint256 public constant MAX_SUPPLY = 5000; uint256 public price = 0.08 ether; uint256 public transformPrice = 0.01 ether; uint256 public randomNumber = 115792089237316195423570985008687907853269984665640564039457584007913129639935; // default random uint16 public MAX_MINT = 10; uint16 public MAX_WHITELIST_MINT = 2; string public baseURI; mapping(address => bool) whitelistedAddress; mapping(address => uint256) public whitelistMinted; mapping(uint256 => PathToken) public tokenIdAttr; mapping(uint256 => string) public tokenIdSentence; mapping(uint256 => uint256) public remainingTransforms; mapping(uint256 => uint256) public transformNumber; event PathBuilt(uint256 indexed tokenId, PathToken path, address indexed owner); event Transformed(uint256 indexed tokenId, PathToken path, string sentence, address indexed owner); event RequestedRandomNumber(bytes32 indexed requestId); event FulfilledRandomNumber(bytes32 indexed requestId, uint256 randomNumber); constructor() VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, 0x514910771AF9Ca656af840dff83E8264EcF986CA) ERC721("Path", "PATH") {} function addtoWhitelist(address[] calldata addresses) external onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(addresses[i] != address(0), "Can't add a null address"); whitelistedAddress[addresses[i]] = true; whitelistMinted[addresses[i]] > 0 ? whitelistMinted[addresses[i]] : 0; } } function whitelistMintPath(uint256 quantity) public payable { require(whitelistedSale, "Sale has not started yet."); require(whitelistedAddress[msg.sender], "User is not whitelisted"); require(quantity > 0, "Mint number cannot be zero"); require(quantity <= MAX_WHITELIST_MINT, "Mint number exceeds maximum per transaction"); require(whitelistMinted[msg.sender] + quantity <= MAX_WHITELIST_MINT, "Max mint for presale"); require(totalSupply() + quantity <= MAX_SUPPLY, "Quantity requested exceeds max supply."); require(msg.value >= price * quantity, "Ether value sent is below the price"); for (uint256 i = 0; i < quantity; i++) { // get tokenId uint256 mintIndex = _tokenIds.current(); // mint _safeMint(msg.sender, mintIndex); //add 1 burn to count remainingTransforms[mintIndex] = 1; // init attributes for path uint256 pathAttr = uint256(keccak256(abi.encode(randomNumber, mintIndex + block.number, block.timestamp, msg.sender))) % (10 ** 32); string memory pathAttrStr = uint2str(pathAttr); uint8 pathCount = generatePaths(pathAttrStr); uint8 windTurbulence = generateWind(pathAttrStr); uint8 template = checkTemplate(pathAttrStr); uint32 pathSeed = getPathSeed(pathAttrStr); uint32 windSeed = getWindSeed(pathAttrStr); tokenIdAttr[mintIndex] = PathToken(template, pathCount, windTurbulence, pathSeed, windSeed); // increment id counter _tokenIds.increment(); //increment mint_count whitelistMinted[msg.sender]++; emit PathBuilt(mintIndex, tokenIdAttr[mintIndex], msg.sender); } } function mintPath(uint256 quantity) public payable { require(saleStarted, "Sale has not started yet."); require(quantity > 0, "Mint number cannot be zero"); require(quantity <= MAX_MINT, "Mint number exceeds maximum per transaction"); require(totalSupply() + quantity <= MAX_SUPPLY, "Quantity requested exceeds max supply."); require(msg.value >= price * quantity, "Ether value sent is below the price"); // (bool success, ) = payoutAccountAddress.call{value: msg.value}(""); // require(success, "Address: unable to send value, recipient may have reverted"); for (uint256 i = 0; i < quantity; i++) { // initialize tokenId uint256 mintIndex = _tokenIds.current(); // mint _safeMint(msg.sender, mintIndex); //add 1 burn to count remainingTransforms[mintIndex] = 1; // init attributes for path uint256 pathAttr = uint256(keccak256(abi.encode(randomNumber, mintIndex + block.number, block.timestamp, msg.sender))) % (10 ** 32); string memory pathAttrStr = uint2str(pathAttr); uint8 pathCount = generatePaths(pathAttrStr); uint8 windTurbulence = generateWind(pathAttrStr); uint8 template = checkTemplate(pathAttrStr); uint32 pathSeed = getPathSeed(pathAttrStr); uint32 windSeed = getWindSeed(pathAttrStr); tokenIdAttr[mintIndex] = PathToken(template, pathCount, windTurbulence, pathSeed, windSeed); // increment id counter _tokenIds.increment(); emit PathBuilt(mintIndex, tokenIdAttr[mintIndex], msg.sender); } } //reserve mints for giveaways function reserveMint(uint quantity) external onlyOwner { require(quantity > 0, "Mint number cannot be zero"); require(totalSupply() + quantity <= MAX_SUPPLY, "Quantity requested exceeds max supply."); for (uint256 i = 0; i < quantity; i++) { // initialize tokenId uint256 mintIndex = _tokenIds.current(); // mint _safeMint(msg.sender, mintIndex); //add 1 burn to count remainingTransforms[mintIndex] = 1; uint256 pathAttr = uint256(keccak256(abi.encode(randomNumber, mintIndex + block.number, block.timestamp, msg.sender))) % (10 ** 32); string memory pathAttrStr = uint2str(pathAttr); uint8 pathCount = generatePaths(pathAttrStr); uint8 windTurbulence = generateWind(pathAttrStr); uint8 template = checkTemplate(pathAttrStr); uint32 pathSeed = getPathSeed(pathAttrStr); uint32 windSeed = getWindSeed(pathAttrStr); tokenIdAttr[mintIndex] = PathToken(template, pathCount, windTurbulence, pathSeed, windSeed); // increment id counter _tokenIds.increment(); emit PathBuilt(mintIndex, tokenIdAttr[mintIndex], msg.sender); } } function transformFreePath(uint256 _tokenId, string memory sentence) public{ require(ownerOf(_tokenId) == msg.sender, "Caller does not own this token"); require(remainingTransforms[_tokenId] > 0, "No more remaining burns"); remainingTransforms[_tokenId]--; tokenIdSentence[_tokenId] = sentence; transformNumber[_tokenId]++; emit Transformed(_tokenId, tokenIdAttr[_tokenId], sentence, msg.sender); } function transformPath(uint256 _tokenId, string memory sentence) public payable{ require(ownerOf(_tokenId) == msg.sender, "Caller does not own this token"); require(msg.value >= transformPrice, "Ether value sent is below the price"); tokenIdSentence[_tokenId] = sentence; transformNumber[_tokenId]++; emit Transformed(_tokenId, tokenIdAttr[_tokenId], sentence, msg.sender); } function setBaseURI(string memory uri) public onlyOwner { baseURI = uri; } function setSaleStarted() public onlyOwner { saleStarted = !saleStarted; } function setWhitelistSale() public onlyOwner { whitelistedSale = !whitelistedSale; } function hasSaleStarted() public view returns (bool) { return saleStarted; } function setPrice(uint256 _price) public onlyOwner { price = _price; } function setTransformPrice(uint256 _transformPrice) public onlyOwner { transformPrice = _transformPrice; } function hasSoldOut() public view returns (bool) { if (totalSupply() >= MAX_SUPPLY) { return true; } else { return false; } } function requestRandomNumber(bytes32 keyhash, uint256 fee) public onlyOwner returns (bytes32) { bytes32 requestId = requestRandomness(keyhash, fee); emit RequestedRandomNumber(requestId); return requestId; } function fulfillRandomness(bytes32 requestId, uint256 _randomNumber) internal override { randomNumber = _randomNumber; emit FulfilledRandomNumber(requestId, _randomNumber); } function _baseURI() internal view override returns (string memory) { return baseURI; } function totalSupply() public view override returns (uint256) { return _tokenIds.current(); } //override functions function tokenURI(uint256 tokenId)public view override(ERC721, ERC721URIStorage) returns (string memory) { return super.tokenURI(tokenId); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { super._burn(tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function withdraw() external onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT 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 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; 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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/LinkTokenInterface.sol"; import "./VRFRequestIDBase.sol"; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constuctor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator, _link) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash), and have told you the minimum LINK * @dev price for VRF service. Make sure your contract has sufficient LINK, and * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you * @dev want to generate randomness from. * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomness method. * * @dev The randomness argument to fulfillRandomness is the actual random value * @dev generated from your seed. * * @dev The requestId argument is generated from the keyHash and the seed by * @dev makeRequestId(keyHash, seed). If your contract could have concurrent * @dev requests open, you can use the requestId to track which seed is * @dev associated with which randomness. See VRFRequestIDBase.sol for more * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously.) * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. (Which is critical to making unpredictable randomness! See the * @dev next section.) * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the ultimate input to the VRF is mixed with the block hash of the * @dev block in which the request is made, user-provided seeds have no impact * @dev on its economic security properties. They are only included for API * @dev compatability with previous versions of this contract. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. */ abstract contract VRFConsumerBase is VRFRequestIDBase { /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBase expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomness the VRF output */ function fulfillRandomness( bytes32 requestId, uint256 randomness ) internal virtual; /** * @dev In order to keep backwards compatibility we have kept the user * seed field around. We remove the use of it because given that the blockhash * enters later, it overrides whatever randomness the used seed provides. * Given that it adds no security, and can easily lead to misunderstandings, * we have removed it from usage and can now provide a simpler API. */ uint256 constant private USER_SEED_PLACEHOLDER = 0; /** * @notice requestRandomness initiates a request for VRF output given _seed * * @dev The fulfillRandomness method receives the output, once it's provided * @dev by the Oracle, and verified by the vrfCoordinator. * * @dev The _keyHash must already be registered with the VRFCoordinator, and * @dev the _fee must exceed the fee specified during registration of the * @dev _keyHash. * * @dev The _seed parameter is vestigial, and is kept only for API * @dev compatibility with older versions. It can't *hurt* to mix in some of * @dev your own randomness, here, but it's not necessary because the VRF * @dev oracle will mix the hash of the block containing your request into the * @dev VRF seed it ultimately uses. * * @param _keyHash ID of public key against which randomness is generated * @param _fee The amount of LINK to send with the request * * @return requestId unique ID for this request * * @dev The returned requestId can be used to distinguish responses to * @dev concurrent requests. It is passed as the first argument to * @dev fulfillRandomness. */ function requestRandomness( bytes32 _keyHash, uint256 _fee ) internal returns ( bytes32 requestId ) { LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER)); // This is the seed passed to VRFCoordinator. The oracle will mix this with // the hash of the block containing this request to obtain the seed/input // which is finally passed to the VRF cryptographic machinery. uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]); // nonces[_keyHash] must stay in sync with // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest). // This provides protection against the user repeating their input seed, // which would result in a predictable/duplicate output, if multiple such // requests appeared in the same block. nonces[_keyHash] = nonces[_keyHash] + 1; return makeRequestId(_keyHash, vRFSeed); } LinkTokenInterface immutable internal LINK; address immutable private vrfCoordinator; // Nonces for each VRF key from which randomness has been requested. // // Must stay in sync with VRFCoordinator[_keyHash][this] mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces; /** * @param _vrfCoordinator address of VRFCoordinator contract * @param _link address of LINK token contract * * @dev https://docs.chain.link/docs/link-token-contracts */ constructor( address _vrfCoordinator, address _link ) { vrfCoordinator = _vrfCoordinator; LINK = LinkTokenInterface(_link); } // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomness( bytes32 requestId, uint256 randomness ) external { require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill"); fulfillRandomness(requestId, randomness); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract PathHelper { function getPathWeights() internal pure returns (uint16[12] memory){ uint16[12] memory pathWeights = [50,250,400,800,1500,2000,2000,1500,800,400,250,50]; return pathWeights; } function getWindWeights() internal pure returns (uint16[20] memory){ uint16[20] memory windWeights = [50,150,175,200,300,450,600,800,1050,1225,1225,1050,800,600,450,300,200,175,150,50]; return windWeights; } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len; while (_i != 0) { k = k-1; uint8 temp = (48 + uint8(_i - _i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } function str2Uint(string memory s) internal pure returns (uint) { bytes memory b = bytes(s); uint256 result = 0; for (uint i = 0; i < b.length; i++) { if (b[i] >= 0x30 && b[i] <= 0x39) { result = result * 10 + (uint8(b[i]) - 48); } } return result; } function getSubstring(uint256 start, uint256 end, string memory attr) internal pure returns (string memory) { bytes memory a = new bytes(end-start+1); for(uint i=0;i<=end-start;i++){ a[i] = bytes(attr)[i+start-1]; } return string(a); } function checkTemplate(string memory _pathAttr) internal pure returns (uint8 template) { string memory legendStr = getSubstring(2,5,_pathAttr); uint256 legendAttr = str2Uint(legendStr); if(legendAttr >= 9980){ //chance of getting lengendary return 2; } else if(legendAttr >= 8000){ //ascended chance return 1; } else return 0; } function generatePaths(string memory _pathAttr) internal pure returns (uint8 pathCount) { uint16 [12] memory pathWeights = getPathWeights(); string memory pathAttrStr = getSubstring(6,9,_pathAttr); uint256 pathAttr = str2Uint(pathAttrStr); for(uint8 i=0; i < pathWeights.length; i++){ if(pathAttr < pathWeights[i]){ return i+1; //return circle number } pathAttr -= pathWeights[i]; } } function generateWind(string memory _pathAttr) internal pure returns (uint8 windStrength) { uint16 [20] memory windWeights = getWindWeights(); string memory windAttrStr = getSubstring(10,13,_pathAttr); uint256 windAttr = str2Uint(windAttrStr); for(uint8 i=0; i < windWeights.length; i++){ if(windAttr < windWeights[i]){ return i+1; //return circle number } windAttr -= windWeights[i]; } } function getPathSeed(string memory _pathAttr) internal pure returns (uint32 pathSeed) { return uint32(str2Uint(getSubstring(15,21,_pathAttr))); } function getWindSeed(string memory _pathAttr) internal pure returns (uint32 windSeed) { return uint32(str2Uint(getSubstring(22,28,_pathAttr))); } }
// 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; 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; /** * @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 "../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; /** * @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; /** * @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 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; 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 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 "../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; interface LinkTokenInterface { function allowance( address owner, address spender ) external view returns ( uint256 remaining ); function approve( address spender, uint256 value ) external returns ( bool success ); function balanceOf( address owner ) external view returns ( uint256 balance ); function decimals() external view returns ( uint8 decimalPlaces ); function decreaseApproval( address spender, uint256 addedValue ) external returns ( bool success ); function increaseApproval( address spender, uint256 subtractedValue ) external; function name() external view returns ( string memory tokenName ); function symbol() external view returns ( string memory tokenSymbol ); function totalSupply() external view returns ( uint256 totalTokensIssued ); function transfer( address to, uint256 value ) external returns ( bool success ); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns ( bool success ); function transferFrom( address from, address to, uint256 value ) external returns ( bool success ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract VRFRequestIDBase { /** * @notice returns the seed which is actually input to the VRF coordinator * * @dev To prevent repetition of VRF output due to repetition of the * @dev user-supplied seed, that seed is combined in a hash with the * @dev user-specific nonce, and the address of the consuming contract. The * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in * @dev the final seed, but the nonce does protect against repetition in * @dev requests which are included in a single block. * * @param _userSeed VRF seed input provided by user * @param _requester Address of the requesting contract * @param _nonce User-specific nonce at the time of the request */ function makeVRFInputSeed( bytes32 _keyHash, uint256 _userSeed, address _requester, uint256 _nonce ) internal pure returns ( uint256 ) { return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce))); } /** * @notice Returns the id for this request * @param _keyHash The serviceAgreement ID to be used for this request * @param _vRFInputSeed The seed to be passed directly to the VRF * @return The id for this request * * @dev Note that _vRFInputSeed is not the seed passed by the consuming * @dev contract, but the one generated by makeVRFInputSeed */ function makeRequestId( bytes32 _keyHash, uint256 _vRFInputSeed ) internal pure returns ( bytes32 ) { return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
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":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"FulfilledRandomNumber","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":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"template","type":"uint8"},{"internalType":"uint8","name":"pathCount","type":"uint8"},{"internalType":"uint8","name":"windTurbulence","type":"uint8"},{"internalType":"uint32","name":"pathSeed","type":"uint32"},{"internalType":"uint32","name":"windSeed","type":"uint32"}],"indexed":false,"internalType":"struct Path.PathToken","name":"path","type":"tuple"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"PathBuilt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RequestedRandomNumber","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"template","type":"uint8"},{"internalType":"uint8","name":"pathCount","type":"uint8"},{"internalType":"uint8","name":"windTurbulence","type":"uint8"},{"internalType":"uint32","name":"pathSeed","type":"uint32"},{"internalType":"uint32","name":"windSeed","type":"uint32"}],"indexed":false,"internalType":"struct Path.PathToken","name":"path","type":"tuple"},{"indexed":false,"internalType":"string","name":"sentence","type":"string"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"Transformed","type":"event"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WHITELIST_MINT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addtoWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasSaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPath","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"remainingTransforms","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"keyhash","type":"bytes32"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"requestRandomNumber","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"reserveMint","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":[],"name":"saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSaleStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_transformPrice","type":"uint256"}],"name":"setTransformPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setWhitelistSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdAttr","outputs":[{"internalType":"uint8","name":"template","type":"uint8"},{"internalType":"uint8","name":"pathCount","type":"uint8"},{"internalType":"uint8","name":"windTurbulence","type":"uint8"},{"internalType":"uint32","name":"pathSeed","type":"uint32"},{"internalType":"uint32","name":"windSeed","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdSentence","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"sentence","type":"string"}],"name":"transformFreePath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"transformNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"sentence","type":"string"}],"name":"transformPath","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"transformPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"whitelistMintPath","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistedSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052600e805461ffff1916905567011c37937e080000600f55662386f26fc100006010556000196011556012805463ffffffff19166202000a1790553480156200004b57600080fd5b5073f0d54349addcf704f77ae15b96510dea15cb795273514910771af9ca656af840dff83e8264ecf986ca604051806040016040528060048152602001630a0c2e8d60e31b815250604051806040016040528060048152602001630a082a8960e31b8152508160009080519060200190620000c892919062000164565b508051620000de90600190602084019062000164565b5050506001600160601b0319606092831b811660a052911b166080526200010c620001063390565b62000112565b62000247565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000172906200020a565b90600052602060002090601f016020900481019282620001965760008555620001e1565b82601f10620001b157805160ff1916838001178555620001e1565b82800160010185558215620001e1579182015b82811115620001e1578251825591602001919060010190620001c4565b50620001ef929150620001f3565b5090565b5b80821115620001ef5760008155600101620001f4565b600181811c908216806200021f57607f821691505b602082108114156200024157634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160601c61403c6200027a60003960008181611a07015261225a0152600061222b015261403c6000f3fe6080604052600436106102ae5760003560e01c806380f28af311610175578063b13e964c116100dc578063ccbac9f511610095578063d5866c0d1161006f578063d5866c0d1461089b578063e985e9c5146108ae578063f0292a03146108f7578063f2fde38b1461091257600080fd5b8063ccbac9f51461085d578063cdc898d614610873578063cef216e21461088657600080fd5b8063b13e964c1461071c578063b70501651461073b578063b88d4fde146107d4578063c08dfd3c146107f4578063c87b56dd14610828578063c94f9a5d1461084857600080fd5b806391b7f5ed1161012e57806391b7f5ed1461066457806394985ddd1461068457806395d89b41146106a457806398a8cffe146106b9578063a035b1fe146106e6578063a22cb465146106fc57600080fd5b806380f28af3146105a3578063833156fb146105c357806388d173ec146105e35780638d36ba28146106105780638d3aaf2f146106265780638da5cb5b1461064657600080fd5b806332cb6b0c1161021957806355f804b3116101d257806355f804b3146104ff5780635c474f9e1461051f5780636352211e146105395780636c0360eb1461055957806370a082311461056e578063715018a61461058e57600080fd5b806332cb6b0c14610454578063372007241461046a5780633ccfd60b1461049757806342842e0e146104ac5780634f6ccce7146104cc57806350ca4745146104ec57600080fd5b80631342ff4c1161026b5780631342ff4c146103a757806318160ddd146103c75780631c8b232d146103dc57806323b872dd146103f45780632f745c591461041457806332a905951461043457600080fd5b806301ffc9a7146102b357806303824f76146102e857806306fdde03146102fd578063081812fc1461031f578063095ea7b3146103575780630abead0b14610379575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004613a14565b610932565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506102d3610943565b34801561030957600080fd5b50610312610961565b6040516102df9190613b9a565b34801561032b57600080fd5b5061033f61033a366004613a7f565b6109f3565b6040516001600160a01b0390911681526020016102df565b34801561036357600080fd5b5061037761037236600461393e565b610a8d565b005b34801561038557600080fd5b506103996103943660046139f3565b610ba3565b6040519081526020016102df565b3480156103b357600080fd5b506103776103c2366004613a7f565b610c11565b3480156103d357600080fd5b50610399610eea565b3480156103e857600080fd5b50600e5460ff166102d3565b34801561040057600080fd5b5061037761040f366004613854565b610efa565b34801561042057600080fd5b5061039961042f36600461393e565b610f2b565b34801561044057600080fd5b5061031261044f366004613a7f565b610fc1565b34801561046057600080fd5b5061039961138881565b34801561047657600080fd5b50610399610485366004613a7f565b60196020526000908152604090205481565b3480156104a357600080fd5b5061037761105b565b3480156104b857600080fd5b506103776104c7366004613854565b6110b4565b3480156104d857600080fd5b506103996104e7366004613a7f565b6110cf565b6103776104fa366004613a7f565b611170565b34801561050b57600080fd5b5061037761051a366004613a4c565b6114bc565b34801561052b57600080fd5b50600e546102d39060ff1681565b34801561054557600080fd5b5061033f610554366004613a7f565b6114f9565b34801561056557600080fd5b50610312611570565b34801561057a57600080fd5b50610399610589366004613808565b61157d565b34801561059a57600080fd5b50610377611604565b3480156105af57600080fd5b506103776105be366004613a7f565b61163a565b3480156105cf57600080fd5b506103776105de366004613a97565b611669565b3480156105ef57600080fd5b506103996105fe366004613a7f565b60186020526000908152604090205481565b34801561061c57600080fd5b5061039960105481565b34801561063257600080fd5b50610377610641366004613967565b6117d1565b34801561065257600080fd5b50600c546001600160a01b031661033f565b34801561067057600080fd5b5061037761067f366004613a7f565b6119cd565b34801561069057600080fd5b5061037761069f3660046139f3565b6119fc565b3480156106b057600080fd5b50610312611a7e565b3480156106c557600080fd5b506103996106d4366004613808565b60156020526000908152604090205481565b3480156106f257600080fd5b50610399600f5481565b34801561070857600080fd5b50610377610717366004613908565b611a8d565b34801561072857600080fd5b50600e546102d390610100900460ff1681565b34801561074757600080fd5b50610799610756366004613a7f565b60166020526000908152604090205460ff808216916101008104821691620100008204169063ffffffff6301000000820481169167010000000000000090041685565b6040805160ff96871681529486166020860152929094169183019190915263ffffffff9081166060830152909116608082015260a0016102df565b3480156107e057600080fd5b506103776107ef36600461388f565b611b4b565b34801561080057600080fd5b506012546108159062010000900461ffff1681565b60405161ffff90911681526020016102df565b34801561083457600080fd5b50610312610843366004613a7f565b611b83565b34801561085457600080fd5b50610377611b8e565b34801561086957600080fd5b5061039960115481565b610377610881366004613a7f565b611bcc565b34801561089257600080fd5b50610377612011565b6103776108a9366004613a97565b612058565b3480156108ba57600080fd5b506102d36108c9366004613822565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561090357600080fd5b506012546108159061ffff1681565b34801561091e57600080fd5b5061037761092d366004613808565b6120f9565b600061093d82612194565b92915050565b6000611388610950610eea565b1061095b5750600190565b50600090565b60606000805461097090613f16565b80601f016020809104026020016040519081016040528092919081815260200182805461099c90613f16565b80156109e95780601f106109be576101008083540402835291602001916109e9565b820191906000526020600020905b8154815290600101906020018083116109cc57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a715760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a98826114f9565b9050806001600160a01b0316836001600160a01b03161415610b065760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a68565b336001600160a01b0382161480610b225750610b2281336108c9565b610b945760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a68565b610b9e83836121b9565b505050565b600c546000906001600160a01b03163314610bd05760405162461bcd60e51b8152600401610a6890613cbf565b6000610bdc8484612227565b60405190915081907fc620a79baed7e5f06637aa5ab699c2b03ee40b2ae3ba4a91ed1eb0bd00b8ea3b90600090a29392505050565b600c546001600160a01b03163314610c3b5760405162461bcd60e51b8152600401610a6890613cbf565b60008111610c5b5760405162461bcd60e51b8152600401610a6890613c45565b61138881610c67610eea565b610c719190613e29565b1115610c8f5760405162461bcd60e51b8152600401610a6890613bff565b60005b81811015610ee6576000610ca5600d5490565b9050610cb133826123ba565b6000818152601860205260408120600190556011546d04ee2d6d415b85acef810000000090610ce04385613e29565b60408051602081019390935282015242606082015233608082015260a0016040516020818303038152906040528051906020012060001c610d219190613f8c565b90506000610d2e826123d4565b90506000610d3b82612519565b90506000610d48836125ee565b90506000610d55846126b0565b90506000610d62856126ff565b90506000610d6f86612716565b90506040518060a001604052808460ff1681526020018660ff1681526020018560ff1681526020018363ffffffff1681526020018263ffffffff16815250601660008a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550905050610e82600d80546001019055565b60008881526016602052604090819020905133918a917fc714c4f4c92176cd7cb7a43eb32437d355cbef0b737ddcdd3c2e648a342d6d8c91610ec391613d90565b60405180910390a350505050505050508080610ede90613f51565b915050610c92565b5050565b6000610ef5600d5490565b905090565b610f043382612728565b610f205760405162461bcd60e51b8152600401610a6890613d3f565b610b9e83838361281b565b6000610f368361157d565b8210610f985760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a68565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60176020526000908152604090208054610fda90613f16565b80601f016020809104026020016040519081016040528092919081815260200182805461100690613f16565b80156110535780601f1061102857610100808354040283529160200191611053565b820191906000526020600020905b81548152906001019060200180831161103657829003601f168201915b505050505081565b600c546001600160a01b031633146110855760405162461bcd60e51b8152600401610a6890613cbf565b6040514790339082156108fc029083906000818181858888f19350505050158015610ee6573d6000803e3d6000fd5b610b9e83838360405180602001604052806000815250611b4b565b60006110da60085490565b821061113d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a68565b6008828154811061115e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e5460ff166111be5760405162461bcd60e51b815260206004820152601960248201527829b0b632903430b9903737ba1039ba30b93a32b2103cb2ba1760391b6044820152606401610a68565b600081116111de5760405162461bcd60e51b8152600401610a6890613c45565b60125461ffff168111156112045760405162461bcd60e51b8152600401610a6890613cf4565b61138881611210610eea565b61121a9190613e29565b11156112385760405162461bcd60e51b8152600401610a6890613bff565b80600f546112469190613e7a565b3410156112655760405162461bcd60e51b8152600401610a6890613c7c565b60005b81811015610ee657600061127b600d5490565b905061128733826123ba565b6000818152601860205260408120600190556011546d04ee2d6d415b85acef8100000000906112b64385613e29565b60408051602081019390935282015242606082015233608082015260a0016040516020818303038152906040528051906020012060001c6112f79190613f8c565b90506000611304826123d4565b9050600061131182612519565b9050600061131e836125ee565b9050600061132b846126b0565b90506000611338856126ff565b9050600061134586612716565b90506040518060a001604052808460ff1681526020018660ff1681526020018560ff1681526020018363ffffffff1681526020018263ffffffff16815250601660008a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550905050611458600d80546001019055565b60008881526016602052604090819020905133918a917fc714c4f4c92176cd7cb7a43eb32437d355cbef0b737ddcdd3c2e648a342d6d8c9161149991613d90565b60405180910390a3505050505050505080806114b490613f51565b915050611268565b600c546001600160a01b031633146114e65760405162461bcd60e51b8152600401610a6890613cbf565b8051610ee6906013906020840190613680565b6000818152600260205260408120546001600160a01b03168061093d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a68565b60138054610fda90613f16565b60006001600160a01b0382166115e85760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a68565b506001600160a01b031660009081526003602052604090205490565b600c546001600160a01b0316331461162e5760405162461bcd60e51b8152600401610a6890613cbf565b61163860006129c6565b565b600c546001600160a01b031633146116645760405162461bcd60e51b8152600401610a6890613cbf565b601055565b33611673836114f9565b6001600160a01b0316146116c95760405162461bcd60e51b815260206004820152601e60248201527f43616c6c657220646f6573206e6f74206f776e207468697320746f6b656e00006044820152606401610a68565b6000828152601860205260409020546117245760405162461bcd60e51b815260206004820152601760248201527f4e6f206d6f72652072656d61696e696e67206275726e730000000000000000006044820152606401610a68565b600082815260186020526040812080549161173e83613eff565b90915550506000828152601760209081526040909120825161176292840190613680565b50600082815260196020526040812080549161177d83613f51565b9091555050600082815260166020526040908190209051339184917f3435f7cadd4ae16d88547ea307056d6283121858ffbb9597ac0dfbe37c7e7c12916117c5918690613dd6565b60405180910390a35050565b600c546001600160a01b031633146117fb5760405162461bcd60e51b8152600401610a6890613cbf565b60005b81811015610b9e57600083838381811061182857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061183d9190613808565b6001600160a01b031614156118945760405162461bcd60e51b815260206004820152601860248201527f43616e2774206164642061206e756c6c206164647265737300000000000000006044820152606401610a68565b6001601460008585858181106118ba57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906118cf9190613808565b6001600160a01b0316815260208101919091526040016000908120805460ff19169215159290921790915560158185858581811061191d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906119329190613808565b6001600160a01b03166001600160a01b03168152602001908152602001600020541161195f5760006119ba565b6015600084848481811061198357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906119989190613808565b6001600160a01b03166001600160a01b03168152602001908152602001600020545b50806119c581613f51565b9150506117fe565b600c546001600160a01b031633146119f75760405162461bcd60e51b8152600401610a6890613cbf565b600f55565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a745760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610a68565b610ee68282612a18565b60606001805461097090613f16565b6001600160a01b038216331415611ae65760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a68565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016117c5565b611b553383612728565b611b715760405162461bcd60e51b8152600401610a6890613d3f565b611b7d84848484612a56565b50505050565b606061093d82612a89565b600c546001600160a01b03163314611bb85760405162461bcd60e51b8152600401610a6890613cbf565b600e805460ff19811660ff90911615179055565b600e54610100900460ff16611c1f5760405162461bcd60e51b815260206004820152601960248201527829b0b632903430b9903737ba1039ba30b93a32b2103cb2ba1760391b6044820152606401610a68565b3360009081526014602052604090205460ff16611c7e5760405162461bcd60e51b815260206004820152601760248201527f55736572206973206e6f742077686974656c69737465640000000000000000006044820152606401610a68565b60008111611c9e5760405162461bcd60e51b8152600401610a6890613c45565b60125462010000900461ffff16811115611cca5760405162461bcd60e51b8152600401610a6890613cf4565b601254336000908152601560205260409020546201000090910461ffff1690611cf4908390613e29565b1115611d395760405162461bcd60e51b81526020600482015260146024820152734d6178206d696e7420666f722070726573616c6560601b6044820152606401610a68565b61138881611d45610eea565b611d4f9190613e29565b1115611d6d5760405162461bcd60e51b8152600401610a6890613bff565b80600f54611d7b9190613e7a565b341015611d9a5760405162461bcd60e51b8152600401610a6890613c7c565b60005b81811015610ee6576000611db0600d5490565b9050611dbc33826123ba565b6000818152601860205260408120600190556011546d04ee2d6d415b85acef810000000090611deb4385613e29565b60408051602081019390935282015242606082015233608082015260a0016040516020818303038152906040528051906020012060001c611e2c9190613f8c565b90506000611e39826123d4565b90506000611e4682612519565b90506000611e53836125ee565b90506000611e60846126b0565b90506000611e6d856126ff565b90506000611e7a86612716565b90506040518060a001604052808460ff1681526020018660ff1681526020018560ff1681526020018363ffffffff1681526020018263ffffffff16815250601660008a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550905050611f8d600d80546001019055565b336000908152601560205260408120805491611fa883613f51565b909155505060008881526016602052604090819020905133918a917fc714c4f4c92176cd7cb7a43eb32437d355cbef0b737ddcdd3c2e648a342d6d8c91611fee91613d90565b60405180910390a35050505050505050808061200990613f51565b915050611d9d565b600c546001600160a01b0316331461203b5760405162461bcd60e51b8152600401610a6890613cbf565b600e805461ff001981166101009182900460ff1615909102179055565b33612062836114f9565b6001600160a01b0316146120b85760405162461bcd60e51b815260206004820152601e60248201527f43616c6c657220646f6573206e6f74206f776e207468697320746f6b656e00006044820152606401610a68565b6010543410156120da5760405162461bcd60e51b8152600401610a6890613c7c565b6000828152601760209081526040909120825161176292840190613680565b600c546001600160a01b031633146121235760405162461bcd60e51b8152600401610a6890613cbf565b6001600160a01b0381166121885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a68565b612191816129c6565b50565b60006001600160e01b0319821663780e9d6360e01b148061093d575061093d82612bfb565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121ee826114f9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001612297929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016122c493929190613b6a565b602060405180830381600087803b1580156122de57600080fd5b505af11580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231691906139d7565b506000838152600b6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052612372906001613e29565b6000858152600b60205260409020556123b28482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b949350505050565b610ee6828260405180602001604052806000815250612c4b565b6060816123f85750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612422578061240c81613f51565b915061241b9050600a83613e66565b91506123fc565b60008167ffffffffffffffff81111561244b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612475576020820181803683370190505b509050815b85156125105761248b600182613e99565b9050600061249a600a88613e66565b6124a590600a613e7a565b6124af9088613e99565b6124ba906030613e41565b905060008160f81b9050808484815181106124e557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612507600a89613e66565b9750505061247a565b50949350505050565b600080612524612c7e565b905060006125356006600986612cf5565b9050600061254282612dfd565b905060005b600c8160ff1610156125e557838160ff16600c811061257657634e487b7160e01b600052603260045260246000fd5b602002015161ffff1682101561259b57612591816001613e41565b9695505050505050565b838160ff16600c81106125be57634e487b7160e01b600052603260045260246000fd5b60200201516125d19061ffff1683613e99565b9150806125dd81613f6c565b915050612547565b50505050919050565b6000806125f9612eee565b9050600061260a600a600d86612cf5565b9050600061261782612dfd565b905060005b60148160ff1610156125e557838160ff166014811061264b57634e487b7160e01b600052603260045260246000fd5b602002015161ffff1682101561266657612591816001613e41565b838160ff166014811061268957634e487b7160e01b600052603260045260246000fd5b602002015161269c9061ffff1683613e99565b9150806126a881613f6c565b91505061261c565b6000806126c06002600585612cf5565b905060006126cd82612dfd565b90506126fc81106126e2575060029392505050565b611f4081106126f5575060019392505050565b5060009392505050565b600061093d612711600f601585612cf5565b612dfd565b600061093d6127116016601c85612cf5565b6000818152600260205260408120546001600160a01b03166127a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a68565b60006127ac836114f9565b9050806001600160a01b0316846001600160a01b031614806127e75750836001600160a01b03166127dc846109f3565b6001600160a01b0316145b806123b257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff166123b2565b826001600160a01b031661282e826114f9565b6001600160a01b0316146128965760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a68565b6001600160a01b0382166128f85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a68565b612903838383612fa7565b61290e6000826121b9565b6001600160a01b0383166000908152600360205260408120805460019290612937908490613e99565b90915550506001600160a01b0382166000908152600360205260408120805460019290612965908490613e29565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b601181905560405181815282907f06befaa0704abddc846a6dddef96953f7694bc9d2f49bb96b7ede59fb5f198f59060200160405180910390a25050565b612a6184848461281b565b612a6d84848484612fb2565b611b7d5760405162461bcd60e51b8152600401610a6890613bad565b6000818152600260205260409020546060906001600160a01b0316612b0a5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a68565b6000828152600a602052604081208054612b2390613f16565b80601f0160208091040260200160405190810160405280929190818152602001828054612b4f90613f16565b8015612b9c5780601f10612b7157610100808354040283529160200191612b9c565b820191906000526020600020905b815481529060010190602001808311612b7f57829003601f168201915b505050505090506000612bad6130bc565b9050805160001415612bc0575092915050565b815115612bf2578082604051602001612bda929190613b08565b60405160208183030381529060405292505050919050565b6123b2846130cb565b60006001600160e01b031982166380ac58cd60e01b1480612c2c57506001600160e01b03198216635b5e139f60e01b145b8061093d57506301ffc9a760e01b6001600160e01b031983161461093d565b612c5583836131a6565b612c626000848484612fb2565b610b9e5760405162461bcd60e51b8152600401610a6890613bad565b612c86613704565b506040805161018081018252603280825260fa60208301819052610190938301849052610320606084018190526105dc608085018190526107d060a0860181905260c086015260e085015261010084015261012083019390935261014082019290925261016081019190915290565b60606000612d038585613e99565b612d0e906001613e29565b67ffffffffffffffff811115612d3457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d5e576020820181803683370190505b50905060005b612d6e8686613e99565b811161251057836001612d818884613e29565b612d8b9190613e99565b81518110612da957634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b828281518110612dd457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080612df581613f51565b915050612d64565b60008181805b8251811015612ee657603060f81b838281518110612e3157634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191610801590612e805750603960f81b838281518110612e6e57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191611155b15612ed4576030838281518110612ea757634e487b7160e01b600052603260045260246000fd5b0160200151612eb9919060f81c613eb0565b60ff16612ec783600a613e7a565b612ed19190613e29565b91505b80612ede81613f51565b915050612e03565b509392505050565b612ef6613723565b506040805161028081018252603280825260966020830181905260af93830184905260c86060840181905261012c608085018190526101c260a0860181905261025860c0870181905261032060e0880181905261041a61010089018190526104c96101208a018190526101408a01526101608901526101808801526101a08701526101c08601526101e085015261020084015261022083019390935261024082019290925261026081019190915290565b610b9e8383836132f4565b60006001600160a01b0384163b156130b457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ff6903390899088908890600401613b37565b602060405180830381600087803b15801561301057600080fd5b505af1925050508015613040575060408051601f3d908101601f1916820190925261303d91810190613a30565b60015b61309a573d80801561306e576040519150601f19603f3d011682016040523d82523d6000602084013e613073565b606091505b5080516130925760405162461bcd60e51b8152600401610a6890613bad565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123b2565b5060016123b2565b60606013805461097090613f16565b6000818152600260205260409020546060906001600160a01b031661314a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a68565b60006131546130bc565b90506000815111613174576040518060200160405280600081525061319f565b8061317e846133ac565b60405160200161318f929190613b08565b6040516020818303038152906040525b9392505050565b6001600160a01b0382166131fc5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a68565b6000818152600260205260409020546001600160a01b0316156132615760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a68565b61326d60008383612fa7565b6001600160a01b0382166000908152600360205260408120805460019290613296908490613e29565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b03831661334f5761334a81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613372565b816001600160a01b0316836001600160a01b0316146133725761337283826134c6565b6001600160a01b03821661338957610b9e81613563565b826001600160a01b0316826001600160a01b031614610b9e57610b9e828261363c565b6060816133d05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156133fa57806133e481613f51565b91506133f39050600a83613e66565b91506133d4565b60008167ffffffffffffffff81111561342357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561344d576020820181803683370190505b5090505b84156123b257613462600183613e99565b915061346f600a86613f8c565b61347a906030613e29565b60f81b81838151811061349d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506134bf600a86613e66565b9450613451565b600060016134d38461157d565b6134dd9190613e99565b600083815260076020526040902054909150808214613530576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061357590600190613e99565b600083815260096020526040812054600880549394509092849081106135ab57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106135da57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061362057634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006136478361157d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461368c90613f16565b90600052602060002090601f0160209004810192826136ae57600085556136f4565b82601f106136c757805160ff19168380011785556136f4565b828001600101855582156136f4579182015b828111156136f45782518255916020019190600101906136d9565b50613700929150613742565b5090565b604051806101800160405280600c906020820280368337509192915050565b6040518061028001604052806014906020820280368337509192915050565b5b808211156137005760008155600101613743565b600067ffffffffffffffff8084111561377257613772613fcc565b604051601f8501601f19908116603f0116810190828211818310171561379a5761379a613fcc565b816040528093508581528686860111156137b357600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146137e457600080fd5b919050565b600082601f8301126137f9578081fd5b61319f83833560208501613757565b600060208284031215613819578081fd5b61319f826137cd565b60008060408385031215613834578081fd5b61383d836137cd565b915061384b602084016137cd565b90509250929050565b600080600060608486031215613868578081fd5b613871846137cd565b925061387f602085016137cd565b9150604084013590509250925092565b600080600080608085870312156138a4578081fd5b6138ad856137cd565b93506138bb602086016137cd565b925060408501359150606085013567ffffffffffffffff8111156138dd578182fd5b8501601f810187136138ed578182fd5b6138fc87823560208401613757565b91505092959194509250565b6000806040838503121561391a578182fd5b613923836137cd565b9150602083013561393381613fe2565b809150509250929050565b60008060408385031215613950578182fd5b613959836137cd565b946020939093013593505050565b60008060208385031215613979578182fd5b823567ffffffffffffffff80821115613990578384fd5b818501915085601f8301126139a3578384fd5b8135818111156139b1578485fd5b8660208260051b85010111156139c5578485fd5b60209290920196919550909350505050565b6000602082840312156139e8578081fd5b815161319f81613fe2565b60008060408385031215613a05578182fd5b50508035926020909101359150565b600060208284031215613a25578081fd5b813561319f81613ff0565b600060208284031215613a41578081fd5b815161319f81613ff0565b600060208284031215613a5d578081fd5b813567ffffffffffffffff811115613a73578182fd5b6123b2848285016137e9565b600060208284031215613a90578081fd5b5035919050565b60008060408385031215613aa9578182fd5b82359150602083013567ffffffffffffffff811115613ac6578182fd5b613ad2858286016137e9565b9150509250929050565b60008151808452613af4816020860160208601613ed3565b601f01601f19169290920160200192915050565b60008351613b1a818460208801613ed3565b835190830190613b2e818360208801613ed3565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061259190830184613adc565b60018060a01b0384168152826020820152606060408201526000613b916060830184613adc565b95945050505050565b60208152600061319f6020830184613adc565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f5175616e74697479207265717565737465642065786365656473206d617820736040820152653ab838363c9760d11b606082015260800190565b6020808252601a908201527f4d696e74206e756d6265722063616e6e6f74206265207a65726f000000000000604082015260600190565b60208082526023908201527f45746865722076616c75652073656e742069732062656c6f772074686520707260408201526269636560e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f4d696e74206e756d6265722065786365656473206d6178696d756d207065722060408201526a3a3930b739b0b1ba34b7b760a91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b815460ff8082168352600882901c81166020840152601082901c16604083015263ffffffff601882901c8116606084015260389190911c16608082015260a0810161093d565b825460ff8082168352600882901c81166020840152601082901c16604083015263ffffffff601882901c8116606084015260389190911c16608082015260c060a082015260006123b260c0830184613adc565b60008219821115613e3c57613e3c613fa0565b500190565b600060ff821660ff84168060ff03821115613e5e57613e5e613fa0565b019392505050565b600082613e7557613e75613fb6565b500490565b6000816000190483118215151615613e9457613e94613fa0565b500290565b600082821015613eab57613eab613fa0565b500390565b600060ff821660ff841680821015613eca57613eca613fa0565b90039392505050565b60005b83811015613eee578181015183820152602001613ed6565b83811115611b7d5750506000910152565b600081613f0e57613f0e613fa0565b506000190190565b600181811c90821680613f2a57607f821691505b60208210811415613f4b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613f6557613f65613fa0565b5060010190565b600060ff821660ff811415613f8357613f83613fa0565b60010192915050565b600082613f9b57613f9b613fb6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461219157600080fd5b6001600160e01b03198116811461219157600080fdfea2646970667358221220c1e9426136417f79b788cde5799115327a880425cd4bf05a4cf83ddd3b148d5064736f6c63430008040033
Deployed Bytecode
0x6080604052600436106102ae5760003560e01c806380f28af311610175578063b13e964c116100dc578063ccbac9f511610095578063d5866c0d1161006f578063d5866c0d1461089b578063e985e9c5146108ae578063f0292a03146108f7578063f2fde38b1461091257600080fd5b8063ccbac9f51461085d578063cdc898d614610873578063cef216e21461088657600080fd5b8063b13e964c1461071c578063b70501651461073b578063b88d4fde146107d4578063c08dfd3c146107f4578063c87b56dd14610828578063c94f9a5d1461084857600080fd5b806391b7f5ed1161012e57806391b7f5ed1461066457806394985ddd1461068457806395d89b41146106a457806398a8cffe146106b9578063a035b1fe146106e6578063a22cb465146106fc57600080fd5b806380f28af3146105a3578063833156fb146105c357806388d173ec146105e35780638d36ba28146106105780638d3aaf2f146106265780638da5cb5b1461064657600080fd5b806332cb6b0c1161021957806355f804b3116101d257806355f804b3146104ff5780635c474f9e1461051f5780636352211e146105395780636c0360eb1461055957806370a082311461056e578063715018a61461058e57600080fd5b806332cb6b0c14610454578063372007241461046a5780633ccfd60b1461049757806342842e0e146104ac5780634f6ccce7146104cc57806350ca4745146104ec57600080fd5b80631342ff4c1161026b5780631342ff4c146103a757806318160ddd146103c75780631c8b232d146103dc57806323b872dd146103f45780632f745c591461041457806332a905951461043457600080fd5b806301ffc9a7146102b357806303824f76146102e857806306fdde03146102fd578063081812fc1461031f578063095ea7b3146103575780630abead0b14610379575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004613a14565b610932565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506102d3610943565b34801561030957600080fd5b50610312610961565b6040516102df9190613b9a565b34801561032b57600080fd5b5061033f61033a366004613a7f565b6109f3565b6040516001600160a01b0390911681526020016102df565b34801561036357600080fd5b5061037761037236600461393e565b610a8d565b005b34801561038557600080fd5b506103996103943660046139f3565b610ba3565b6040519081526020016102df565b3480156103b357600080fd5b506103776103c2366004613a7f565b610c11565b3480156103d357600080fd5b50610399610eea565b3480156103e857600080fd5b50600e5460ff166102d3565b34801561040057600080fd5b5061037761040f366004613854565b610efa565b34801561042057600080fd5b5061039961042f36600461393e565b610f2b565b34801561044057600080fd5b5061031261044f366004613a7f565b610fc1565b34801561046057600080fd5b5061039961138881565b34801561047657600080fd5b50610399610485366004613a7f565b60196020526000908152604090205481565b3480156104a357600080fd5b5061037761105b565b3480156104b857600080fd5b506103776104c7366004613854565b6110b4565b3480156104d857600080fd5b506103996104e7366004613a7f565b6110cf565b6103776104fa366004613a7f565b611170565b34801561050b57600080fd5b5061037761051a366004613a4c565b6114bc565b34801561052b57600080fd5b50600e546102d39060ff1681565b34801561054557600080fd5b5061033f610554366004613a7f565b6114f9565b34801561056557600080fd5b50610312611570565b34801561057a57600080fd5b50610399610589366004613808565b61157d565b34801561059a57600080fd5b50610377611604565b3480156105af57600080fd5b506103776105be366004613a7f565b61163a565b3480156105cf57600080fd5b506103776105de366004613a97565b611669565b3480156105ef57600080fd5b506103996105fe366004613a7f565b60186020526000908152604090205481565b34801561061c57600080fd5b5061039960105481565b34801561063257600080fd5b50610377610641366004613967565b6117d1565b34801561065257600080fd5b50600c546001600160a01b031661033f565b34801561067057600080fd5b5061037761067f366004613a7f565b6119cd565b34801561069057600080fd5b5061037761069f3660046139f3565b6119fc565b3480156106b057600080fd5b50610312611a7e565b3480156106c557600080fd5b506103996106d4366004613808565b60156020526000908152604090205481565b3480156106f257600080fd5b50610399600f5481565b34801561070857600080fd5b50610377610717366004613908565b611a8d565b34801561072857600080fd5b50600e546102d390610100900460ff1681565b34801561074757600080fd5b50610799610756366004613a7f565b60166020526000908152604090205460ff808216916101008104821691620100008204169063ffffffff6301000000820481169167010000000000000090041685565b6040805160ff96871681529486166020860152929094169183019190915263ffffffff9081166060830152909116608082015260a0016102df565b3480156107e057600080fd5b506103776107ef36600461388f565b611b4b565b34801561080057600080fd5b506012546108159062010000900461ffff1681565b60405161ffff90911681526020016102df565b34801561083457600080fd5b50610312610843366004613a7f565b611b83565b34801561085457600080fd5b50610377611b8e565b34801561086957600080fd5b5061039960115481565b610377610881366004613a7f565b611bcc565b34801561089257600080fd5b50610377612011565b6103776108a9366004613a97565b612058565b3480156108ba57600080fd5b506102d36108c9366004613822565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561090357600080fd5b506012546108159061ffff1681565b34801561091e57600080fd5b5061037761092d366004613808565b6120f9565b600061093d82612194565b92915050565b6000611388610950610eea565b1061095b5750600190565b50600090565b60606000805461097090613f16565b80601f016020809104026020016040519081016040528092919081815260200182805461099c90613f16565b80156109e95780601f106109be576101008083540402835291602001916109e9565b820191906000526020600020905b8154815290600101906020018083116109cc57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a715760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a98826114f9565b9050806001600160a01b0316836001600160a01b03161415610b065760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a68565b336001600160a01b0382161480610b225750610b2281336108c9565b610b945760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a68565b610b9e83836121b9565b505050565b600c546000906001600160a01b03163314610bd05760405162461bcd60e51b8152600401610a6890613cbf565b6000610bdc8484612227565b60405190915081907fc620a79baed7e5f06637aa5ab699c2b03ee40b2ae3ba4a91ed1eb0bd00b8ea3b90600090a29392505050565b600c546001600160a01b03163314610c3b5760405162461bcd60e51b8152600401610a6890613cbf565b60008111610c5b5760405162461bcd60e51b8152600401610a6890613c45565b61138881610c67610eea565b610c719190613e29565b1115610c8f5760405162461bcd60e51b8152600401610a6890613bff565b60005b81811015610ee6576000610ca5600d5490565b9050610cb133826123ba565b6000818152601860205260408120600190556011546d04ee2d6d415b85acef810000000090610ce04385613e29565b60408051602081019390935282015242606082015233608082015260a0016040516020818303038152906040528051906020012060001c610d219190613f8c565b90506000610d2e826123d4565b90506000610d3b82612519565b90506000610d48836125ee565b90506000610d55846126b0565b90506000610d62856126ff565b90506000610d6f86612716565b90506040518060a001604052808460ff1681526020018660ff1681526020018560ff1681526020018363ffffffff1681526020018263ffffffff16815250601660008a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550905050610e82600d80546001019055565b60008881526016602052604090819020905133918a917fc714c4f4c92176cd7cb7a43eb32437d355cbef0b737ddcdd3c2e648a342d6d8c91610ec391613d90565b60405180910390a350505050505050508080610ede90613f51565b915050610c92565b5050565b6000610ef5600d5490565b905090565b610f043382612728565b610f205760405162461bcd60e51b8152600401610a6890613d3f565b610b9e83838361281b565b6000610f368361157d565b8210610f985760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a68565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60176020526000908152604090208054610fda90613f16565b80601f016020809104026020016040519081016040528092919081815260200182805461100690613f16565b80156110535780601f1061102857610100808354040283529160200191611053565b820191906000526020600020905b81548152906001019060200180831161103657829003601f168201915b505050505081565b600c546001600160a01b031633146110855760405162461bcd60e51b8152600401610a6890613cbf565b6040514790339082156108fc029083906000818181858888f19350505050158015610ee6573d6000803e3d6000fd5b610b9e83838360405180602001604052806000815250611b4b565b60006110da60085490565b821061113d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a68565b6008828154811061115e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e5460ff166111be5760405162461bcd60e51b815260206004820152601960248201527829b0b632903430b9903737ba1039ba30b93a32b2103cb2ba1760391b6044820152606401610a68565b600081116111de5760405162461bcd60e51b8152600401610a6890613c45565b60125461ffff168111156112045760405162461bcd60e51b8152600401610a6890613cf4565b61138881611210610eea565b61121a9190613e29565b11156112385760405162461bcd60e51b8152600401610a6890613bff565b80600f546112469190613e7a565b3410156112655760405162461bcd60e51b8152600401610a6890613c7c565b60005b81811015610ee657600061127b600d5490565b905061128733826123ba565b6000818152601860205260408120600190556011546d04ee2d6d415b85acef8100000000906112b64385613e29565b60408051602081019390935282015242606082015233608082015260a0016040516020818303038152906040528051906020012060001c6112f79190613f8c565b90506000611304826123d4565b9050600061131182612519565b9050600061131e836125ee565b9050600061132b846126b0565b90506000611338856126ff565b9050600061134586612716565b90506040518060a001604052808460ff1681526020018660ff1681526020018560ff1681526020018363ffffffff1681526020018263ffffffff16815250601660008a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550905050611458600d80546001019055565b60008881526016602052604090819020905133918a917fc714c4f4c92176cd7cb7a43eb32437d355cbef0b737ddcdd3c2e648a342d6d8c9161149991613d90565b60405180910390a3505050505050505080806114b490613f51565b915050611268565b600c546001600160a01b031633146114e65760405162461bcd60e51b8152600401610a6890613cbf565b8051610ee6906013906020840190613680565b6000818152600260205260408120546001600160a01b03168061093d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a68565b60138054610fda90613f16565b60006001600160a01b0382166115e85760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a68565b506001600160a01b031660009081526003602052604090205490565b600c546001600160a01b0316331461162e5760405162461bcd60e51b8152600401610a6890613cbf565b61163860006129c6565b565b600c546001600160a01b031633146116645760405162461bcd60e51b8152600401610a6890613cbf565b601055565b33611673836114f9565b6001600160a01b0316146116c95760405162461bcd60e51b815260206004820152601e60248201527f43616c6c657220646f6573206e6f74206f776e207468697320746f6b656e00006044820152606401610a68565b6000828152601860205260409020546117245760405162461bcd60e51b815260206004820152601760248201527f4e6f206d6f72652072656d61696e696e67206275726e730000000000000000006044820152606401610a68565b600082815260186020526040812080549161173e83613eff565b90915550506000828152601760209081526040909120825161176292840190613680565b50600082815260196020526040812080549161177d83613f51565b9091555050600082815260166020526040908190209051339184917f3435f7cadd4ae16d88547ea307056d6283121858ffbb9597ac0dfbe37c7e7c12916117c5918690613dd6565b60405180910390a35050565b600c546001600160a01b031633146117fb5760405162461bcd60e51b8152600401610a6890613cbf565b60005b81811015610b9e57600083838381811061182857634e487b7160e01b600052603260045260246000fd5b905060200201602081019061183d9190613808565b6001600160a01b031614156118945760405162461bcd60e51b815260206004820152601860248201527f43616e2774206164642061206e756c6c206164647265737300000000000000006044820152606401610a68565b6001601460008585858181106118ba57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906118cf9190613808565b6001600160a01b0316815260208101919091526040016000908120805460ff19169215159290921790915560158185858581811061191d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906119329190613808565b6001600160a01b03166001600160a01b03168152602001908152602001600020541161195f5760006119ba565b6015600084848481811061198357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906119989190613808565b6001600160a01b03166001600160a01b03168152602001908152602001600020545b50806119c581613f51565b9150506117fe565b600c546001600160a01b031633146119f75760405162461bcd60e51b8152600401610a6890613cbf565b600f55565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614611a745760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610a68565b610ee68282612a18565b60606001805461097090613f16565b6001600160a01b038216331415611ae65760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a68565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016117c5565b611b553383612728565b611b715760405162461bcd60e51b8152600401610a6890613d3f565b611b7d84848484612a56565b50505050565b606061093d82612a89565b600c546001600160a01b03163314611bb85760405162461bcd60e51b8152600401610a6890613cbf565b600e805460ff19811660ff90911615179055565b600e54610100900460ff16611c1f5760405162461bcd60e51b815260206004820152601960248201527829b0b632903430b9903737ba1039ba30b93a32b2103cb2ba1760391b6044820152606401610a68565b3360009081526014602052604090205460ff16611c7e5760405162461bcd60e51b815260206004820152601760248201527f55736572206973206e6f742077686974656c69737465640000000000000000006044820152606401610a68565b60008111611c9e5760405162461bcd60e51b8152600401610a6890613c45565b60125462010000900461ffff16811115611cca5760405162461bcd60e51b8152600401610a6890613cf4565b601254336000908152601560205260409020546201000090910461ffff1690611cf4908390613e29565b1115611d395760405162461bcd60e51b81526020600482015260146024820152734d6178206d696e7420666f722070726573616c6560601b6044820152606401610a68565b61138881611d45610eea565b611d4f9190613e29565b1115611d6d5760405162461bcd60e51b8152600401610a6890613bff565b80600f54611d7b9190613e7a565b341015611d9a5760405162461bcd60e51b8152600401610a6890613c7c565b60005b81811015610ee6576000611db0600d5490565b9050611dbc33826123ba565b6000818152601860205260408120600190556011546d04ee2d6d415b85acef810000000090611deb4385613e29565b60408051602081019390935282015242606082015233608082015260a0016040516020818303038152906040528051906020012060001c611e2c9190613f8c565b90506000611e39826123d4565b90506000611e4682612519565b90506000611e53836125ee565b90506000611e60846126b0565b90506000611e6d856126ff565b90506000611e7a86612716565b90506040518060a001604052808460ff1681526020018660ff1681526020018560ff1681526020018363ffffffff1681526020018263ffffffff16815250601660008a815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548163ffffffff021916908363ffffffff16021790555060808201518160000160076101000a81548163ffffffff021916908363ffffffff160217905550905050611f8d600d80546001019055565b336000908152601560205260408120805491611fa883613f51565b909155505060008881526016602052604090819020905133918a917fc714c4f4c92176cd7cb7a43eb32437d355cbef0b737ddcdd3c2e648a342d6d8c91611fee91613d90565b60405180910390a35050505050505050808061200990613f51565b915050611d9d565b600c546001600160a01b0316331461203b5760405162461bcd60e51b8152600401610a6890613cbf565b600e805461ff001981166101009182900460ff1615909102179055565b33612062836114f9565b6001600160a01b0316146120b85760405162461bcd60e51b815260206004820152601e60248201527f43616c6c657220646f6573206e6f74206f776e207468697320746f6b656e00006044820152606401610a68565b6010543410156120da5760405162461bcd60e51b8152600401610a6890613c7c565b6000828152601760209081526040909120825161176292840190613680565b600c546001600160a01b031633146121235760405162461bcd60e51b8152600401610a6890613cbf565b6001600160a01b0381166121885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a68565b612191816129c6565b50565b60006001600160e01b0319821663780e9d6360e01b148061093d575061093d82612bfb565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121ee826114f9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001612297929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016122c493929190613b6a565b602060405180830381600087803b1580156122de57600080fd5b505af11580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231691906139d7565b506000838152600b6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052612372906001613e29565b6000858152600b60205260409020556123b28482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b949350505050565b610ee6828260405180602001604052806000815250612c4b565b6060816123f85750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612422578061240c81613f51565b915061241b9050600a83613e66565b91506123fc565b60008167ffffffffffffffff81111561244b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612475576020820181803683370190505b509050815b85156125105761248b600182613e99565b9050600061249a600a88613e66565b6124a590600a613e7a565b6124af9088613e99565b6124ba906030613e41565b905060008160f81b9050808484815181106124e557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612507600a89613e66565b9750505061247a565b50949350505050565b600080612524612c7e565b905060006125356006600986612cf5565b9050600061254282612dfd565b905060005b600c8160ff1610156125e557838160ff16600c811061257657634e487b7160e01b600052603260045260246000fd5b602002015161ffff1682101561259b57612591816001613e41565b9695505050505050565b838160ff16600c81106125be57634e487b7160e01b600052603260045260246000fd5b60200201516125d19061ffff1683613e99565b9150806125dd81613f6c565b915050612547565b50505050919050565b6000806125f9612eee565b9050600061260a600a600d86612cf5565b9050600061261782612dfd565b905060005b60148160ff1610156125e557838160ff166014811061264b57634e487b7160e01b600052603260045260246000fd5b602002015161ffff1682101561266657612591816001613e41565b838160ff166014811061268957634e487b7160e01b600052603260045260246000fd5b602002015161269c9061ffff1683613e99565b9150806126a881613f6c565b91505061261c565b6000806126c06002600585612cf5565b905060006126cd82612dfd565b90506126fc81106126e2575060029392505050565b611f4081106126f5575060019392505050565b5060009392505050565b600061093d612711600f601585612cf5565b612dfd565b600061093d6127116016601c85612cf5565b6000818152600260205260408120546001600160a01b03166127a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a68565b60006127ac836114f9565b9050806001600160a01b0316846001600160a01b031614806127e75750836001600160a01b03166127dc846109f3565b6001600160a01b0316145b806123b257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff166123b2565b826001600160a01b031661282e826114f9565b6001600160a01b0316146128965760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a68565b6001600160a01b0382166128f85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a68565b612903838383612fa7565b61290e6000826121b9565b6001600160a01b0383166000908152600360205260408120805460019290612937908490613e99565b90915550506001600160a01b0382166000908152600360205260408120805460019290612965908490613e29565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b601181905560405181815282907f06befaa0704abddc846a6dddef96953f7694bc9d2f49bb96b7ede59fb5f198f59060200160405180910390a25050565b612a6184848461281b565b612a6d84848484612fb2565b611b7d5760405162461bcd60e51b8152600401610a6890613bad565b6000818152600260205260409020546060906001600160a01b0316612b0a5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a68565b6000828152600a602052604081208054612b2390613f16565b80601f0160208091040260200160405190810160405280929190818152602001828054612b4f90613f16565b8015612b9c5780601f10612b7157610100808354040283529160200191612b9c565b820191906000526020600020905b815481529060010190602001808311612b7f57829003601f168201915b505050505090506000612bad6130bc565b9050805160001415612bc0575092915050565b815115612bf2578082604051602001612bda929190613b08565b60405160208183030381529060405292505050919050565b6123b2846130cb565b60006001600160e01b031982166380ac58cd60e01b1480612c2c57506001600160e01b03198216635b5e139f60e01b145b8061093d57506301ffc9a760e01b6001600160e01b031983161461093d565b612c5583836131a6565b612c626000848484612fb2565b610b9e5760405162461bcd60e51b8152600401610a6890613bad565b612c86613704565b506040805161018081018252603280825260fa60208301819052610190938301849052610320606084018190526105dc608085018190526107d060a0860181905260c086015260e085015261010084015261012083019390935261014082019290925261016081019190915290565b60606000612d038585613e99565b612d0e906001613e29565b67ffffffffffffffff811115612d3457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d5e576020820181803683370190505b50905060005b612d6e8686613e99565b811161251057836001612d818884613e29565b612d8b9190613e99565b81518110612da957634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b828281518110612dd457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080612df581613f51565b915050612d64565b60008181805b8251811015612ee657603060f81b838281518110612e3157634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191610801590612e805750603960f81b838281518110612e6e57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191611155b15612ed4576030838281518110612ea757634e487b7160e01b600052603260045260246000fd5b0160200151612eb9919060f81c613eb0565b60ff16612ec783600a613e7a565b612ed19190613e29565b91505b80612ede81613f51565b915050612e03565b509392505050565b612ef6613723565b506040805161028081018252603280825260966020830181905260af93830184905260c86060840181905261012c608085018190526101c260a0860181905261025860c0870181905261032060e0880181905261041a61010089018190526104c96101208a018190526101408a01526101608901526101808801526101a08701526101c08601526101e085015261020084015261022083019390935261024082019290925261026081019190915290565b610b9e8383836132f4565b60006001600160a01b0384163b156130b457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ff6903390899088908890600401613b37565b602060405180830381600087803b15801561301057600080fd5b505af1925050508015613040575060408051601f3d908101601f1916820190925261303d91810190613a30565b60015b61309a573d80801561306e576040519150601f19603f3d011682016040523d82523d6000602084013e613073565b606091505b5080516130925760405162461bcd60e51b8152600401610a6890613bad565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506123b2565b5060016123b2565b60606013805461097090613f16565b6000818152600260205260409020546060906001600160a01b031661314a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a68565b60006131546130bc565b90506000815111613174576040518060200160405280600081525061319f565b8061317e846133ac565b60405160200161318f929190613b08565b6040516020818303038152906040525b9392505050565b6001600160a01b0382166131fc5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a68565b6000818152600260205260409020546001600160a01b0316156132615760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a68565b61326d60008383612fa7565b6001600160a01b0382166000908152600360205260408120805460019290613296908490613e29565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b03831661334f5761334a81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613372565b816001600160a01b0316836001600160a01b0316146133725761337283826134c6565b6001600160a01b03821661338957610b9e81613563565b826001600160a01b0316826001600160a01b031614610b9e57610b9e828261363c565b6060816133d05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156133fa57806133e481613f51565b91506133f39050600a83613e66565b91506133d4565b60008167ffffffffffffffff81111561342357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561344d576020820181803683370190505b5090505b84156123b257613462600183613e99565b915061346f600a86613f8c565b61347a906030613e29565b60f81b81838151811061349d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506134bf600a86613e66565b9450613451565b600060016134d38461157d565b6134dd9190613e99565b600083815260076020526040902054909150808214613530576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061357590600190613e99565b600083815260096020526040812054600880549394509092849081106135ab57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106135da57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061362057634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006136478361157d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461368c90613f16565b90600052602060002090601f0160209004810192826136ae57600085556136f4565b82601f106136c757805160ff19168380011785556136f4565b828001600101855582156136f4579182015b828111156136f45782518255916020019190600101906136d9565b50613700929150613742565b5090565b604051806101800160405280600c906020820280368337509192915050565b6040518061028001604052806014906020820280368337509192915050565b5b808211156137005760008155600101613743565b600067ffffffffffffffff8084111561377257613772613fcc565b604051601f8501601f19908116603f0116810190828211818310171561379a5761379a613fcc565b816040528093508581528686860111156137b357600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b03811681146137e457600080fd5b919050565b600082601f8301126137f9578081fd5b61319f83833560208501613757565b600060208284031215613819578081fd5b61319f826137cd565b60008060408385031215613834578081fd5b61383d836137cd565b915061384b602084016137cd565b90509250929050565b600080600060608486031215613868578081fd5b613871846137cd565b925061387f602085016137cd565b9150604084013590509250925092565b600080600080608085870312156138a4578081fd5b6138ad856137cd565b93506138bb602086016137cd565b925060408501359150606085013567ffffffffffffffff8111156138dd578182fd5b8501601f810187136138ed578182fd5b6138fc87823560208401613757565b91505092959194509250565b6000806040838503121561391a578182fd5b613923836137cd565b9150602083013561393381613fe2565b809150509250929050565b60008060408385031215613950578182fd5b613959836137cd565b946020939093013593505050565b60008060208385031215613979578182fd5b823567ffffffffffffffff80821115613990578384fd5b818501915085601f8301126139a3578384fd5b8135818111156139b1578485fd5b8660208260051b85010111156139c5578485fd5b60209290920196919550909350505050565b6000602082840312156139e8578081fd5b815161319f81613fe2565b60008060408385031215613a05578182fd5b50508035926020909101359150565b600060208284031215613a25578081fd5b813561319f81613ff0565b600060208284031215613a41578081fd5b815161319f81613ff0565b600060208284031215613a5d578081fd5b813567ffffffffffffffff811115613a73578182fd5b6123b2848285016137e9565b600060208284031215613a90578081fd5b5035919050565b60008060408385031215613aa9578182fd5b82359150602083013567ffffffffffffffff811115613ac6578182fd5b613ad2858286016137e9565b9150509250929050565b60008151808452613af4816020860160208601613ed3565b601f01601f19169290920160200192915050565b60008351613b1a818460208801613ed3565b835190830190613b2e818360208801613ed3565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061259190830184613adc565b60018060a01b0384168152826020820152606060408201526000613b916060830184613adc565b95945050505050565b60208152600061319f6020830184613adc565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f5175616e74697479207265717565737465642065786365656473206d617820736040820152653ab838363c9760d11b606082015260800190565b6020808252601a908201527f4d696e74206e756d6265722063616e6e6f74206265207a65726f000000000000604082015260600190565b60208082526023908201527f45746865722076616c75652073656e742069732062656c6f772074686520707260408201526269636560e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f4d696e74206e756d6265722065786365656473206d6178696d756d207065722060408201526a3a3930b739b0b1ba34b7b760a91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b815460ff8082168352600882901c81166020840152601082901c16604083015263ffffffff601882901c8116606084015260389190911c16608082015260a0810161093d565b825460ff8082168352600882901c81166020840152601082901c16604083015263ffffffff601882901c8116606084015260389190911c16608082015260c060a082015260006123b260c0830184613adc565b60008219821115613e3c57613e3c613fa0565b500190565b600060ff821660ff84168060ff03821115613e5e57613e5e613fa0565b019392505050565b600082613e7557613e75613fb6565b500490565b6000816000190483118215151615613e9457613e94613fa0565b500290565b600082821015613eab57613eab613fa0565b500390565b600060ff821660ff841680821015613eca57613eca613fa0565b90039392505050565b60005b83811015613eee578181015183820152602001613ed6565b83811115611b7d5750506000910152565b600081613f0e57613f0e613fa0565b506000190190565b600181811c90821680613f2a57607f821691505b60208210811415613f4b57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613f6557613f65613fa0565b5060010190565b600060ff821660ff811415613f8357613f83613fa0565b60010192915050565b600082613f9b57613f9b613fb6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461219157600080fd5b6001600160e01b03198116811461219157600080fdfea2646970667358221220c1e9426136417f79b788cde5799115327a880425cd4bf05a4cf83ddd3b148d5064736f6c63430008040033
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.