Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
2216
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
token
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "../token/LockableRevealERC721EnumerableToken.sol"; contract token is LockableRevealERC721EnumerableToken { constructor() LockableRevealERC721EnumerableToken( 84, // _projectID 3500, // _maxSupply "Betwixt Braves", // _name "BRAVES", // _symbol "https://camelcoding.mypinata.cloud/ipfs/QmU5aW6M18M4jBwnoaR6cbuRoLkv2qs6r9pLMdssVD8J9P", // _tokenPreRevealURI "https://braves-metadata-server.herokuapp.com/api/metadata/", // _tokenRevealURI false, // _transferLocked 0, // _reservedSupply 0 // _giveawaySupply ) { } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; IRegistryConsumer immutable public TheRegistry = IRegistryConsumer(0x1e8150050A7a4715aad42b905C08df76883f396F); string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2"; uint256 immutable public projectID; uint256 immutable public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 immutable public reservedSupply; // includes giveaway supply uint256 immutable public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping (address => bool) public permitted; mapping(uint16 => revealStruct) public reveals; mapping(bytes32 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; event Allowed(address, bool); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); constructor( uint256 _projectID, uint256 _maxSupply, string memory _721name, string memory _721symbol, string memory _tokenPreRevealURI, string memory _tokenRevealURI, bool _transferLocked, uint256 _reservedSupply, uint256 _giveawaySupply ) ERC721(_721name, _721symbol) { projectID = _projectID; tokenPreRevealURI = _tokenPreRevealURI; tokenRevealURI = _tokenRevealURI; maxSupply = _maxSupply; transferLocked = _transferLocked; reservedSupply = _reservedSupply; giveawaySupply = _giveawaySupply; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { require(!transferLocked, "Token: Transfers are not enabled"); super._beforeTokenTransfer(from, to, _tokenId); } /** * @dev Sale: mint cards. */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed { require(!lastRevealRequested, "Token: Cannot mint after last reveal"); require(mintedSupply + numberOfCards <= maxSupply - reservedSupply, "Token: This would exceed the number of cards available"); uint256 mintId = mintedSupply + 1; for (uint j = 0; j < numberOfCards; j++) { _mint(recipient, mintId++); } mintedSupply+=numberOfCards; } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed { require(lastRevealRequested, "Token: Last reveal must be requested first"); require(mintedReserve + numberOfCards <= reservedSupply - giveawaySupply, "Token: This would exceed the number of cards reserved cards available"); uint256 mintId = mintedSupply + mintedReserve + 1; for (uint j = 0; j < numberOfCards; j++) { _mint(recipient, mintId++); } mintedReserve+=numberOfCards; } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { return mintedSupply + reservedSupply - giveawaySupply + 1; } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed { require(lastRevealRequested, "Token: Last reveal must be requested first"); require(mintedReserve == reservedSupply - giveawaySupply, "Token: Must mint reserved cards first"); uint256 firstIndex = getFirstGiveawayCardId(); require( _index >= firstIndex && _index < firstIndex + giveawaySupply, "Token: Card id not in range"); _mint(_recipient, _index); } /** * @dev Admin: set PreRevealURI */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed { tokenPreRevealURI = _tokenPreRevealURI; } /** * @dev Admin: set RevealURI */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed { tokenRevealURI = _tokenRevealURI; } /** * @dev Admin: reveal tokens starting at prev range end to current supply */ function revealAtCurrentSupply() external onlyAllowed { require(!lastRevealRequested, "Token: Last reveal already requested"); require(reveals[currentRevealCount].RANGE_END < mintedSupply, "Token: Reveal request already exists"); revealStruct storage currentReveal = reveals[++currentRevealCount]; currentReveal.RANGE_END = mintedSupply; currentReveal.REQUEST_ID = IRandomNumberProvider(TheRegistry.getRegistryAddress(REGISTRY_KEY_RANDOM_CONTRACT)).requestRandomNumberWithCallback(); requestToRevealId[currentReveal.REQUEST_ID] = currentRevealCount; } /** * @dev Admin: reveal tokens starting at prev range end to max supply */ function lastReveal() external onlyAllowed { require(!lastRevealRequested, "Token: Last reveal already requested"); require(reveals[currentRevealCount].RANGE_END < maxSupply, "Token: Reveal request already exists"); lastRevealRequested = true; revealStruct storage currentReveal = reveals[++currentRevealCount]; currentReveal.RANGE_END = mintedSupply + reservedSupply; currentReveal.REQUEST_ID = IRandomNumberProvider(TheRegistry.getRegistryAddress(REGISTRY_KEY_RANDOM_CONTRACT)).requestRandomNumberWithCallback(); requestToRevealId[currentReveal.REQUEST_ID] = currentRevealCount; } /** * @dev Chainlink VRF callback */ function process(uint256 _random, bytes32 _requestId) external { require(msg.sender == TheRegistry.getRegistryAddress(REGISTRY_KEY_RANDOM_CONTRACT), "Token: process() Unauthorised caller"); // get reveal using _requestId uint16 thisRevealId = requestToRevealId[_requestId]; revealStruct storage thisReveal = reveals[thisRevealId]; require(!thisReveal.processed, "Token: reveal already processed."); if(thisReveal.REQUEST_ID == _requestId) { thisReveal.RANDOM_NUM = _random / 2; // Set msb to zero // in the very rare case where RANDOM_NUM is 0, use currentReveal.RANGE_END / 3 if(thisReveal.RANDOM_NUM == 0) { thisReveal.RANDOM_NUM = thisReveal.RANGE_END * (10 ** 5) / 3; } thisReveal.RANGE_START = reveals[currentRevealCount-1].RANGE_END; thisReveal.SHIFT = thisReveal.RANDOM_NUM % ( thisReveal.RANGE_END - thisReveal.RANGE_START ); // in the very rare case where the shifting result is 0, do it again but divide by 3 if(thisReveal.SHIFT == 0) { thisReveal.RANDOM_NUM = thisReveal.RANDOM_NUM / 3; thisReveal.SHIFT = thisReveal.RANDOM_NUM % ( thisReveal.RANGE_END - thisReveal.RANGE_START ); } thisReveal.processed = true; emit RandomProcessed( thisRevealId, thisReveal.RANDOM_NUM, thisReveal.SHIFT, thisReveal.RANGE_START, thisReveal.RANGE_END ); } else revert("Token: Incorrect requestId received"); } function findRevealRangeForN(uint256 n) public view returns (uint16) { for(uint16 i = 1; i <= currentRevealCount; i++) { if(n <= reveals[i].RANGE_END) { return i; } } return 0; } function uri(uint256 n) public view returns (uint256) { uint16 rangeId = findRevealRangeForN(n); // outside ranges if(rangeId == 0) { return n; } revealStruct memory currentReveal = reveals[rangeId]; uint256 shiftedN = n + currentReveal.SHIFT; if (shiftedN <= currentReveal.RANGE_END) { return shiftedN; } return currentReveal.RANGE_START + shiftedN - currentReveal.RANGE_END; } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { if(_tokenId > mintedSupply + mintedReserve && _tokenId <= mintedSupply + reservedSupply) { return true; } return false; } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { require(_exists(_tokenId) || _reserved(_tokenId), 'Token: Token does not exist'); uint16 rangeId = findRevealRangeForN(_tokenId); // outside ranges if(rangeId == 0) { return tokenPreRevealURI; } revealStruct memory currentReveal = reveals[rangeId]; // if random number was not set, return pre reveal // TODO: most likely remove this.. as we never get here.. we're already outside range if(currentReveal.RANDOM_NUM == 0) { return tokenPreRevealURI; } uint256 newTokenId = uri(_tokenId); string memory folder = (newTokenId % 100).toString(); string memory file = newTokenId.toString(); string memory slash = "/"; return string(abi.encodePacked(tokenRevealURI, folder, slash, file)); } /** * @dev Admin: Lock / Unlock transfers */ function setTransferLock(bool _locked) external onlyAllowed { transferLocked = _locked; emit Locked(_locked); } /** * @dev Admin: Allow / Dissalow addresses */ function setAllowed(address _addr, bool _state) external onlyOwner { permitted[_addr] = _state; emit Allowed(_addr, _state); } function isAllowed(address _addr) public view returns(bool) { return permitted[_addr] || _addr == owner(); } modifier onlyAllowed() { require(isAllowed(msg.sender), "Token: Unauthorised"); _; } function tellEverything() external view returns (TokenInfo memory) { revealStruct[] memory _reveals = new revealStruct[](currentRevealCount); for(uint16 i = 1; i <= currentRevealCount; i++) { _reveals[i - 1] = reveals[i]; } return TokenInfo( name(), symbol(), projectID, maxSupply, mintedSupply, mintedReserve, reservedSupply, giveawaySupply, tokenPreRevealURI, tokenRevealURI, transferLocked, lastRevealRequested, totalSupply(), _reveals ); } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { return TokenInfoForSale( projectID, maxSupply, reservedSupply ); } function setContractURI(string memory _contractURI) external onlyAllowed { contractURI = _contractURI; emit ContractURIset(_contractURI); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; interface IRegistryConsumer { function getRegistryAddress(string memory key) external view returns (address) ; function getRegistryBool(string memory key) external view returns (bool); function getRegistryUINT(string memory key) external view returns (uint256) ; function getRegistryString(string memory key) external view returns (string memory) ; function isAdmin(address user) external view returns (bool) ; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; interface IRandomNumberProvider { function requestRandomNumber() external returns (bytes32 requestId); function requestRandomNumberWithCallback() external returns (bytes32); function isRequestComplete(bytes32 requestId) external view returns (bool isCompleted); function randomNumber(bytes32 requestId) external view returns (uint256 randomNum); function setAuth(address user, bool grant) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; struct revealStruct { bytes32 REQUEST_ID; uint256 RANDOM_NUM; uint256 SHIFT; uint256 RANGE_START; uint256 RANGE_END; bool processed; } struct TokenInfoForSale { uint256 _projectID; uint256 _maxSupply; uint256 _reservedSupply; } struct TokenInfo { string _name; string _symbol; uint256 _projectID; uint256 _maxSupply; uint256 _mintedSupply; uint256 _mintedReserve; uint256 _reservedSupply; uint256 _giveawaySupply; string _tokenPreRevealURI; string _tokenRevealURI; bool _transferLocked; bool _lastRevealRequested; uint256 _totalSupply; revealStruct[] _reveals; } interface IToken { function mintIncrementalCards(uint256, address) external; function mintReservedCards(uint256, address) external; function mintGiveawayCard(uint256, address) external; function setPreRevealURI(string calldata) external; function setRevealURI(string calldata) external; function revealAtCurrentSupply() external; function lastReveal() external; function process(uint256, bytes32) external; function uri(uint256) external view returns (uint256); function tokenURI(uint256) external view returns (string memory); function setTransferLock(bool) external; function setAllowed(address, bool) external; function isAllowed(address) external view returns(bool); function getFirstGiveawayCardId() external view returns (uint256); function tellEverything() external view returns (TokenInfo memory); function getTokenInfoForSale() external view returns (TokenInfoForSale memory); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; interface IRandomNumberRequester { function process(uint256 rand, bytes32 requestId) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract BlackHolePrevention is Ownable { // blackhole prevention methods function retrieveETH() external onlyOwner { payable(msg.sender).transfer(address(this).balance); } function retrieveERC20(address _tracker, uint256 amount) external onlyOwner { IERC20(_tracker).transfer(msg.sender, amount); } function retrieve721(address _tracker, uint256 id) external onlyOwner { IERC721(_tracker).transferFrom(address(this), msg.sender, id); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"Allowed","type":"event"},{"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":false,"internalType":"string","name":"contractURI","type":"string"}],"name":"ContractURIset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"Locked","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":false,"internalType":"uint256","name":"stage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_shiftsBy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_end","type":"uint256"}],"name":"RandomProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"REGISTRY_KEY_RANDOM_CONTRACT","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TheRegistry","outputs":[{"internalType":"contract IRegistryConsumer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"_reserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRevealCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"findRevealRangeForN","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":"getFirstGiveawayCardId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenInfoForSale","outputs":[{"components":[{"internalType":"uint256","name":"_projectID","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_reservedSupply","type":"uint256"}],"internalType":"struct TokenInfoForSale","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"giveawaySupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"isAllowed","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":[],"name":"lastReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRevealRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"mintGiveawayCard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfCards","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mintIncrementalCards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfCards","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mintReservedCards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"permitted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_random","type":"uint256"},{"internalType":"bytes32","name":"_requestId","type":"bytes32"}],"name":"process","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"projectID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requestToRevealId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"retrieve721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"retrieveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retrieveETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealAtCurrentSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"reveals","outputs":[{"internalType":"bytes32","name":"REQUEST_ID","type":"bytes32"},{"internalType":"uint256","name":"RANDOM_NUM","type":"uint256"},{"internalType":"uint256","name":"SHIFT","type":"uint256"},{"internalType":"uint256","name":"RANGE_START","type":"uint256"},{"internalType":"uint256","name":"RANGE_END","type":"uint256"},{"internalType":"bool","name":"processed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"setAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenPreRevealURI","type":"string"}],"name":"setPreRevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenRevealURI","type":"string"}],"name":"setRevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_locked","type":"bool"}],"name":"setTransferLock","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":[],"name":"tellEverything","outputs":[{"components":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_projectID","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_mintedSupply","type":"uint256"},{"internalType":"uint256","name":"_mintedReserve","type":"uint256"},{"internalType":"uint256","name":"_reservedSupply","type":"uint256"},{"internalType":"uint256","name":"_giveawaySupply","type":"uint256"},{"internalType":"string","name":"_tokenPreRevealURI","type":"string"},{"internalType":"string","name":"_tokenRevealURI","type":"string"},{"internalType":"bool","name":"_transferLocked","type":"bool"},{"internalType":"bool","name":"_lastRevealRequested","type":"bool"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"components":[{"internalType":"bytes32","name":"REQUEST_ID","type":"bytes32"},{"internalType":"uint256","name":"RANDOM_NUM","type":"uint256"},{"internalType":"uint256","name":"SHIFT","type":"uint256"},{"internalType":"uint256","name":"RANGE_START","type":"uint256"},{"internalType":"uint256","name":"RANGE_END","type":"uint256"},{"internalType":"bool","name":"processed","type":"bool"}],"internalType":"struct revealStruct[]","name":"_reveals","type":"tuple[]"}],"internalType":"struct TokenInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPreRevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":[],"name":"transferLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"uri","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
610120604052731e8150050a7a4715aad42b905c08df76883f396f6080523480156200002a57600080fd5b506054610dac6040518060400160405280600e81526020016d426574776978742042726176657360901b8152506040518060400160405280600681526020016542524156455360d01b8152506040518060800160405280605681526020016200418f605691396040518060600160405280603a8152602001620041e5603a9139600080600086868160009080519060200190620000c9929190620001b1565b508051620000df906001906020840190620001b1565b505050620000fc620000f66200015b60201b60201c565b6200015f565b60a089905284516200011690600d906020880190620001b1565b5083516200012c90600e906020870190620001b1565b5060c097909752600f805460ff19169215159290921790915560e0525050506101009190915250620002939050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001bf9062000257565b90600052602060002090601f016020900481019282620001e357600085556200022e565b82601f10620001fe57805160ff19168380011785556200022e565b828001600101855582156200022e579182015b828111156200022e57825182559160200191906001019062000211565b506200023c92915062000240565b5090565b5b808211156200023c576000815560010162000241565b600181811c908216806200026c57607f821691505b6020821081036200028d57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051613e1d62000372600039600081816107f301528181611066015281816115dd01528181612228015281816122e701526124c001526000818161050601528181610d5a01528181611040015281816115fe0152818161186901528181611c20015281816122490152818161243b01526124e101526000818161079d0152818161100a0152818161188a01528181611b8601526124150152600081816106bb01528181610fe401526123ef0152600081816107cc015281816112a901528181611c8901526126d20152613e1d6000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c80637f72f036116101de578063bff356181161010f578063e288e733116100ad578063e985e9c51161007c578063e985e9c51461085a578063ea9d682414610896578063f2fde38b1461089e578063f7e6347d146108b157600080fd5b8063e288e733146107ee578063e7713baa14610815578063e8a3d4851461083f578063e94193251461084757600080fd5b8063d255fe03116100e9578063d255fe0314610785578063d5abeb0114610798578063d5b014c3146107bf578063db739448146107c757600080fd5b8063bff3561814610756578063c1bd8cf914610769578063c87b56dd1461077257600080fd5b8063a22cb4651161017c578063afa88e5511610156578063afa88e5514610716578063b88d4fde14610728578063babcc5391461073b578063bcc0f7251461074e57600080fd5b8063a22cb465146106dd578063a5b3abfb146106f0578063a811a37b1461070357600080fd5b806395d89b41116101b857806395d89b41146106315780639871d6fa1461063957806398f5b238146106415780639c30ea51146106b657600080fd5b80637f72f036146105fa5780638da5cb5b1461060d578063938e3d7b1461061e57600080fd5b80632f151b76116102c35780634cf29258116102615780636cc301e3116102305780636cc301e31461059b57806370a08231146105be578063715018a6146105d157806377d4b504146105d957600080fd5b80634cf292581461053b5780634f6ccce7146105625780636352211e1461057557806369b2b9a71461058857600080fd5b806342842e0e1161029d57806342842e0e146104e6578063432e2006146104f957806344d19d2b146105015780634697f05d1461052857600080fd5b80632f151b76146104ab5780632f745c59146104c05780633d64ac9b146104d357600080fd5b806312686aae1161033057806318160ddd1161030a57806318160ddd1461046a5780631f4bc79d1461047257806323b872dd146104855780632a85db551461049857600080fd5b806312686aae14610442578063160fba561461044f57806317fd1e2f1461045757600080fd5b8063081812fc1161036c578063081812fc146103e7578063095ea7b3146104125780630e89341c1461042757806310d51dd91461043a57600080fd5b806301ffc9a7146103935780630677ef81146103bb57806306fdde03146103d2575b600080fd5b6103a66103a136600461339c565b6108d5565b60405190151581526020015b60405180910390f35b6103c4600c5481565b6040519081526020016103b2565b6103da610900565b6040516103b29190613418565b6103fa6103f536600461342b565b610992565b6040516001600160a01b0390911681526020016103b2565b610425610420366004613459565b610a2c565b005b6103c461043536600461342b565b610b41565b6103da610c07565b600f546103a69060ff1681565b6103da610c95565b610425610465366004613459565b610ca2565b6008546103c4565b6103a661048036600461342b565b610d3d565b610425610493366004613485565b610d9f565b6104256104a63660046134c6565b610dd0565b6104b3610e01565b6040516103b291906135a9565b6103c46104ce366004613459565b6111df565b6104256104e13660046136c3565b611275565b6104256104f4366004613485565b6115be565b6103c46115d9565b6103c47f000000000000000000000000000000000000000000000000000000000000000081565b6104256105363660046136f3565b611644565b6103da604051806040016040528060088152602001672920a72227a6ab1960c11b81525081565b6103c461057036600461342b565b6116d1565b6103fa61058336600461342b565b611764565b61042561059636600461372c565b6117db565b6103a66105a9366004613751565b60106020526000908152604090205460ff1681565b6103c46105cc366004613751565b61198b565b610425611a12565b6014546105e79061ffff1681565b60405161ffff90911681526020016103b2565b6105e761060836600461342b565b611a48565b600a546001600160a01b03166103fa565b61042561062c3660046137fa565b611a9c565b6103da611b0f565b610425611b1e565b61068761064f366004613843565b601160205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff1686565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c0016103b2565b6103c47f000000000000000000000000000000000000000000000000000000000000000081565b6104256106eb3660046136f3565b611d8b565b6104256106fe366004613459565b611d9a565b6104256107113660046134c6565b611e2e565b600f546103a690610100900460ff1681565b610425610736366004613867565b611e5f565b6103a6610749366004613751565b611e91565b6103da611ec8565b6104256107643660046138e7565b611ed5565b6103c4600b5481565b6103da61078036600461342b565b611f3b565b61042561079336600461372c565b6121d7565b6103c47f000000000000000000000000000000000000000000000000000000000000000081565b610425612365565b6103fa7f000000000000000000000000000000000000000000000000000000000000000081565b6103c47f000000000000000000000000000000000000000000000000000000000000000081565b61081d6123be565b60408051825181526020808401519082015291810151908201526060016103b2565b6103da612462565b61042561085536600461372c565b61246f565b6103a6610868366004613904565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6104256125f2565b6104256108ac366004613751565b61273c565b6105e76108bf36600461342b565b60126020526000908152604090205461ffff1681565b60006001600160e01b0319821663780e9d6360e01b14806108fa57506108fa826127d4565b92915050565b60606000805461090f90613932565b80601f016020809104026020016040519081016040528092919081815260200182805461093b90613932565b80156109885780601f1061095d57610100808354040283529160200191610988565b820191906000526020600020905b81548152906001019060200180831161096b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a105760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a3782611764565b9050806001600160a01b0316836001600160a01b031603610aa45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a07565b336001600160a01b0382161480610ac05750610ac08133610868565b610b325760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a07565b610b3c8383612824565b505050565b600080610b4d83611a48565b90508061ffff16600003610b62575090919050565b61ffff81166000908152601160209081526040808320815160c08101835281548152600182015493810193909352600281015491830182905260038101546060840152600481015460808401526005015460ff16151560a0830152909190610bca9086613982565b905081608001518111610bdf57949350505050565b8160800151818360600151610bf49190613982565b610bfe919061399a565b95945050505050565b600e8054610c1490613932565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4090613932565b8015610c8d5780601f10610c6257610100808354040283529160200191610c8d565b820191906000526020600020905b815481529060010190602001808311610c7057829003601f168201915b505050505081565b60138054610c1490613932565b600a546001600160a01b03163314610ccc5760405162461bcd60e51b8152600401610a07906139b1565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c91906139e6565b6000600c54600b54610d4f9190613982565b82118015610d8a57507f0000000000000000000000000000000000000000000000000000000000000000600b54610d869190613982565b8211155b15610d9757506001919050565b506000919050565b610da93382612892565b610dc55760405162461bcd60e51b8152600401610a0790613a03565b610b3c838383612989565b610dd933611e91565b610df55760405162461bcd60e51b8152600401610a0790613a54565b610b3c600d8383613279565b610e77604051806101c001604052806060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081526020016060815260200160001515815260200160001515815260200160008152602001606081525090565b60145460009061ffff1667ffffffffffffffff811115610e9957610e9961376e565b604051908082528060200260200182016040528015610f0857816020015b610ef56040518060c0016040528060008019168152602001600081526020016000815260200160008152602001600081526020016000151581525090565b815260200190600190039081610eb75790505b50905060015b60145461ffff90811690821611610fbb5761ffff8116600090815260116020908152604091829020825160c081018452815481526001808301549382019390935260028201549381019390935260038101546060840152600481015460808401526005015460ff16151560a08301528390610f899084613a81565b61ffff1681518110610f9d57610f9d613aa4565b60200260200101819052508080610fb390613aba565b915050610f0e565b50604051806101c00160405280610fd0610900565b8152602001610fdd611b0f565b81526020017f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000008152602001600b548152602001600c5481526020017f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000008152602001600d805461109790613932565b80601f01602080910402602001604051908101604052809291908181526020018280546110c390613932565b80156111105780601f106110e557610100808354040283529160200191611110565b820191906000526020600020905b8154815290600101906020018083116110f357829003601f168201915b50505050508152602001600e805461112790613932565b80601f016020809104026020016040519081016040528092919081815260200182805461115390613932565b80156111a05780601f10611175576101008083540402835291602001916111a0565b820191906000526020600020905b81548152906001019060200180831161118357829003601f168201915b5050509183525050600f5460ff8082161515602084015261010090910416151560408201526060016111d160085490565b815260200191909152919050565b60006111ea8361198b565b821061124c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a07565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60408051808201825260088152672920a72227a6ab1960c11b60208201529051631d2e660b60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916374b9982c916112dd9190600401613418565b602060405180830381865afa1580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e9190613adb565b6001600160a01b0316336001600160a01b03161461138a5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e3a2070726f63657373282920556e617574686f7269736564206361604482015263363632b960e11b6064820152608401610a07565b60008181526012602090815260408083205461ffff168084526011909252909120600581015460ff16156114005760405162461bcd60e51b815260206004820181905260248201527f546f6b656e3a2072657665616c20616c72656164792070726f6365737365642e6044820152606401610a07565b805483900361156457611414600285613b0e565b600182018190556000036114475760038160040154620186a06114379190613b22565b6114419190613b0e565b60018201555b6014546011906000906114609060019061ffff16613a81565b61ffff1681526020810191909152604001600020600490810154600383018190559082015461148f919061399a565b816001015461149e9190613b41565b600282018190556000036114eb57600381600101546114bd9190613b0e565b6001820155600381015460048201546114d6919061399a565b81600101546114e59190613b41565b60028201555b60058101805460ff191660019081179091558101546002820154600383015460048401546040805161ffff881681526020810195909552840192909252606083015260808201527f959b44b0b513e15fb6ff0120336443b895d08969842e3aed3ac22eb9e933f7b39060a00160405180910390a16115b8565b60405162461bcd60e51b815260206004820152602360248201527f546f6b656e3a20496e636f7272656374207265717565737449642072656365696044820152621d995960ea1b6064820152608401610a07565b50505050565b610b3c83838360405180602001604052806000815250611e5f565b60007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600b5461162a9190613982565b611634919061399a565b61163f906001613982565b905090565b600a546001600160a01b0316331461166e5760405162461bcd60e51b8152600401610a07906139b1565b6001600160a01b038216600081815260106020908152604091829020805460ff19168515159081179091558251938452908301527f64966f3fe2ac8cae5e6f7e4196d1315efafdb78a4377de3887c56fa3b9ac47cb910160405180910390a15050565b60006116dc60085490565b821061173f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a07565b6008828154811061175257611752613aa4565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806108fa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a07565b6117e433611e91565b6118005760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff16156118645760405162461bcd60e51b8152602060048201526024808201527f546f6b656e3a2043616e6e6f74206d696e74206166746572206c6173742072656044820152631d99585b60e21b6064820152608401610a07565b6118ae7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061399a565b82600b546118bc9190613982565b11156119295760405162461bcd60e51b815260206004820152603660248201527f546f6b656e3a205468697320776f756c642065786365656420746865206e756d604482015275626572206f6620636172647320617661696c61626c6560501b6064820152608401610a07565b6000600b54600161193a9190613982565b905060005b8381101561196e5761195c838361195581613b55565b9450612b30565b8061196681613b55565b91505061193f565b5082600b60008282546119819190613982565b9091555050505050565b60006001600160a01b0382166119f65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a07565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611a3c5760405162461bcd60e51b8152600401610a07906139b1565b611a466000612c7e565b565b600060015b60145461ffff90811690821611611a935761ffff81166000908152601160205260409020600401548311611a815792915050565b80611a8b81613aba565b915050611a4d565b50600092915050565b611aa533611e91565b611ac15760405162461bcd60e51b8152600401610a0790613a54565b8051611ad49060159060208401906132fd565b507f74c497646a57fa0eeedc14ff6eec2da957c18c9c77881fe1aff368249b52b5c181604051611b049190613418565b60405180910390a150565b60606001805461090f90613932565b611b2733611e91565b611b435760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff1615611b6b5760405162461bcd60e51b8152600401610a0790613b6e565b60145461ffff166000908152601160205260409020600401547f000000000000000000000000000000000000000000000000000000000000000011611bc25760405162461bcd60e51b8152600401610a0790613bb2565b600f805461ff001916610100179055601480546000916011918391908290611bed9061ffff16613aba565b91906101000a81548161ffff021916908361ffff160217905561ffff1661ffff16815260200190815260200160002090507f0000000000000000000000000000000000000000000000000000000000000000600b54611c4c9190613982565b60048083019190915560408051808201825260088152672920a72227a6ab1960c11b60208201529051631d2e660b60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016926374b9982c92611cbc92909101613418565b602060405180830381865afa158015611cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfd9190613adb565b6001600160a01b031663c532bbac6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611d3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d609190613bf6565b90819055601454600091825260126020526040909120805461ffff191661ffff909216919091179055565b611d96338383612cd0565b5050565b600a546001600160a01b03163314611dc45760405162461bcd60e51b8152600401610a07906139b1565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b505050505050565b611e3733611e91565b611e535760405162461bcd60e51b8152600401610a0790613a54565b610b3c600e8383613279565b611e693383612892565b611e855760405162461bcd60e51b8152600401610a0790613a03565b6115b884848484612d9e565b6001600160a01b03811660009081526010602052604081205460ff16806108fa575050600a546001600160a01b0391821691161490565b600d8054610c1490613932565b611ede33611e91565b611efa5760405162461bcd60e51b8152600401610a0790613a54565b600f805460ff19168215159081179091556040519081527fe3f0ec9c4af57e69d5aeff78a5912ca25733e4458710bab2b55d0985e98aeb5e90602001611b04565b6000818152600260205260409020546060906001600160a01b0316151580611f675750611f6782610d3d565b611fb35760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e3a20546f6b656e20646f6573206e6f7420657869737400000000006044820152606401610a07565b6000611fbe83611a48565b90508061ffff1660000361205f57600d8054611fd990613932565b80601f016020809104026020016040519081016040528092919081815260200182805461200590613932565b80156120525780601f1061202757610100808354040283529160200191612052565b820191906000526020600020905b81548152906001019060200180831161203557829003601f168201915b5050505050915050919050565b61ffff81166000908152601160209081526040808320815160c08101835281548152600182015493810184905260028201549281019290925260038101546060830152600481015460808301526005015460ff16151560a0820152910361215457600d80546120cd90613932565b80601f01602080910402602001604051908101604052809291908181526020018280546120f990613932565b80156121465780601f1061211b57610100808354040283529160200191612146565b820191906000526020600020905b81548152906001019060200180831161212957829003601f168201915b505050505092505050919050565b600061215f85610b41565b90506000612176612171606484613b41565b612dd1565b9050600061218383612dd1565b90506000604051806040016040528060018152602001602f60f81b8152509050600e8382846040516020016121bb9493929190613c2b565b6040516020818303038152906040529650505050505050919050565b6121e033611e91565b6121fc5760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff166122235760405162461bcd60e51b8152600401610a0790613ce5565b61226d7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061399a565b600c54146122cb5760405162461bcd60e51b815260206004820152602560248201527f546f6b656e3a204d757374206d696e7420726573657276656420636172647320604482015264199a5c9cdd60da1b6064820152608401610a07565b60006122d56115d9565b905080831015801561230f575061230c7f000000000000000000000000000000000000000000000000000000000000000082613982565b83105b61235b5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e3a2043617264206964206e6f7420696e2072616e676500000000006044820152606401610a07565b610b3c8284612b30565b600a546001600160a01b0316331461238f5760405162461bcd60e51b8152600401610a07906139b1565b60405133904780156108fc02916000818181858888f193505050501580156123bb573d6000803e3d6000fd5b50565b6123e260405180606001604052806000815260200160008152602001600081525090565b60405180606001604052807f000000000000000000000000000000000000000000000000000000000000000081526020017f000000000000000000000000000000000000000000000000000000000000000081526020017f0000000000000000000000000000000000000000000000000000000000000000815250905090565b60158054610c1490613932565b61247833611e91565b6124945760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff166124bb5760405162461bcd60e51b8152600401610a0790613ce5565b6125057f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061399a565b82600c546125139190613982565b11156125955760405162461bcd60e51b815260206004820152604560248201527f546f6b656e3a205468697320776f756c642065786365656420746865206e756d60448201527f626572206f6620636172647320726573657276656420636172647320617661696064820152646c61626c6560d81b608482015260a401610a07565b6000600c54600b546125a79190613982565b6125b2906001613982565b905060005b838110156125df576125cd838361195581613b55565b806125d781613b55565b9150506125b7565b5082600c60008282546119819190613982565b6125fb33611e91565b6126175760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff161561263f5760405162461bcd60e51b8152600401610a0790613b6e565b600b5460145461ffff16600090815260116020526040902060040154106126785760405162461bcd60e51b8152600401610a0790613bb2565b6014805460009160119183919082906126949061ffff16613aba565b91906101000a81548161ffff021916908361ffff160217905561ffff1661ffff1681526020019081526020016000209050600b5481600401819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166374b9982c604051806040016040528060088152602001672920a72227a6ab1960c11b8152506040518263ffffffff1660e01b8152600401611cbc9190613418565b600a546001600160a01b031633146127665760405162461bcd60e51b8152600401610a07906139b1565b6001600160a01b0381166127cb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a07565b6123bb81612c7e565b60006001600160e01b031982166380ac58cd60e01b148061280557506001600160e01b03198216635b5e139f60e01b145b806108fa57506301ffc9a760e01b6001600160e01b03198316146108fa565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061285982611764565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661290b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a07565b600061291683611764565b9050806001600160a01b0316846001600160a01b0316148061295d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806129815750836001600160a01b031661297684610992565b6001600160a01b0316145b949350505050565b826001600160a01b031661299c82611764565b6001600160a01b031614612a005760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a07565b6001600160a01b038216612a625760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a07565b612a6d838383612ed2565b612a78600082612824565b6001600160a01b0383166000908152600360205260408120805460019290612aa190849061399a565b90915550506001600160a01b0382166000908152600360205260408120805460019290612acf908490613982565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216612b865760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a07565b6000818152600260205260409020546001600160a01b031615612beb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a07565b612bf760008383612ed2565b6001600160a01b0382166000908152600360205260408120805460019290612c20908490613982565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031603612d315760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a07565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612da9848484612989565b612db584848484612f30565b6115b85760405162461bcd60e51b8152600401610a0790613d2f565b606081600003612df85750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612e225780612e0c81613b55565b9150612e1b9050600a83613b0e565b9150612dfc565b60008167ffffffffffffffff811115612e3d57612e3d61376e565b6040519080825280601f01601f191660200182016040528015612e67576020820181803683370190505b5090505b841561298157612e7c60018361399a565b9150612e89600a86613b41565b612e94906030613982565b60f81b818381518110612ea957612ea9613aa4565b60200101906001600160f81b031916908160001a905350612ecb600a86613b0e565b9450612e6b565b600f5460ff1615612f255760405162461bcd60e51b815260206004820181905260248201527f546f6b656e3a205472616e736665727320617265206e6f7420656e61626c65646044820152606401610a07565b610b3c838383613031565b60006001600160a01b0384163b1561302657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f74903390899088908890600401613d81565b6020604051808303816000875af1925050508015612faf575060408051601f3d908101601f19168201909252612fac91810190613db4565b60015b61300c573d808015612fdd576040519150601f19603f3d011682016040523d82523d6000602084013e612fe2565b606091505b5080516000036130045760405162461bcd60e51b8152600401610a0790613d2f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612981565b506001949350505050565b6001600160a01b03831661308c5761308781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6130af565b816001600160a01b0316836001600160a01b0316146130af576130af83826130e9565b6001600160a01b0382166130c657610b3c81613186565b826001600160a01b0316826001600160a01b031614610b3c57610b3c8282613235565b600060016130f68461198b565b613100919061399a565b600083815260076020526040902054909150808214613153576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906131989060019061399a565b600083815260096020526040812054600880549394509092849081106131c0576131c0613aa4565b9060005260206000200154905080600883815481106131e1576131e1613aa4565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061321957613219613dd1565b6001900381819060005260206000200160009055905550505050565b60006132408361198b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461328590613932565b90600052602060002090601f0160209004810192826132a757600085556132ed565b82601f106132c05782800160ff198235161785556132ed565b828001600101855582156132ed579182015b828111156132ed5782358255916020019190600101906132d2565b506132f9929150613371565b5090565b82805461330990613932565b90600052602060002090601f01602090048101928261332b57600085556132ed565b82601f1061334457805160ff19168380011785556132ed565b828001600101855582156132ed579182015b828111156132ed578251825591602001919060010190613356565b5b808211156132f95760008155600101613372565b6001600160e01b0319811681146123bb57600080fd5b6000602082840312156133ae57600080fd5b81356133b981613386565b9392505050565b60005b838110156133db5781810151838201526020016133c3565b838111156115b85750506000910152565b600081518084526134048160208601602086016133c0565b601f01601f19169290920160200192915050565b6020815260006133b960208301846133ec565b60006020828403121561343d57600080fd5b5035919050565b6001600160a01b03811681146123bb57600080fd5b6000806040838503121561346c57600080fd5b823561347781613444565b946020939093013593505050565b60008060006060848603121561349a57600080fd5b83356134a581613444565b925060208401356134b581613444565b929592945050506040919091013590565b600080602083850312156134d957600080fd5b823567ffffffffffffffff808211156134f157600080fd5b818501915085601f83011261350557600080fd5b81358181111561351457600080fd5b86602082850101111561352657600080fd5b60209290920196919550909350505050565b600081518084526020808501945080840160005b8381101561359e57815180518852838101518489015260408082015190890152606080820151908901526080808201519089015260a09081015115159088015260c0909601959082019060010161354c565b509495945050505050565b60208152600082516101c08060208501526135c86101e08501836133ec565b91506020850151601f19808685030160408701526135e684836133ec565b93506040870151606087015260608701516080870152608087015160a087015260a087015160c087015260c087015160e087015260e0870151915061010082818801528088015192505061012081878603018188015261364685846133ec565b94508088015192505061014081878603018188015261366585846133ec565b94508088015192505061016061367e8188018415159052565b87015191506101806136938782018415159052565b8701516101a0878101919091528701518685039091018387015290506136b98382613538565b9695505050505050565b600080604083850312156136d657600080fd5b50508035926020909101359150565b80151581146123bb57600080fd5b6000806040838503121561370657600080fd5b823561371181613444565b91506020830135613721816136e5565b809150509250929050565b6000806040838503121561373f57600080fd5b82359150602083013561372181613444565b60006020828403121561376357600080fd5b81356133b981613444565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561379f5761379f61376e565b604051601f8501601f19908116603f011681019082821181831017156137c7576137c761376e565b816040528093508581528686860111156137e057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561380c57600080fd5b813567ffffffffffffffff81111561382357600080fd5b8201601f8101841361383457600080fd5b61298184823560208401613784565b60006020828403121561385557600080fd5b813561ffff811681146133b957600080fd5b6000806000806080858703121561387d57600080fd5b843561388881613444565b9350602085013561389881613444565b925060408501359150606085013567ffffffffffffffff8111156138bb57600080fd5b8501601f810187136138cc57600080fd5b6138db87823560208401613784565b91505092959194509250565b6000602082840312156138f957600080fd5b81356133b9816136e5565b6000806040838503121561391757600080fd5b823561392281613444565b9150602083013561372181613444565b600181811c9082168061394657607f821691505b60208210810361396657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156139955761399561396c565b500190565b6000828210156139ac576139ac61396c565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156139f857600080fd5b81516133b9816136e5565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260139082015272151bdad95b8e88155b985d5d1a1bdc9a5cd959606a1b604082015260600190565b600061ffff83811690831681811015613a9c57613a9c61396c565b039392505050565b634e487b7160e01b600052603260045260246000fd5b600061ffff808316818103613ad157613ad161396c565b6001019392505050565b600060208284031215613aed57600080fd5b81516133b981613444565b634e487b7160e01b600052601260045260246000fd5b600082613b1d57613b1d613af8565b500490565b6000816000190483118215151615613b3c57613b3c61396c565b500290565b600082613b5057613b50613af8565b500690565b600060018201613b6757613b6761396c565b5060010190565b60208082526024908201527f546f6b656e3a204c6173742072657665616c20616c72656164792072657175656040820152631cdd195960e21b606082015260800190565b60208082526024908201527f546f6b656e3a2052657665616c207265717565737420616c72656164792065786040820152636973747360e01b606082015260800190565b600060208284031215613c0857600080fd5b5051919050565b60008151613c218185602086016133c0565b9290920192915050565b600080865481600182811c915080831680613c4757607f831692505b60208084108203613c6657634e487b7160e01b86526022600452602486fd5b818015613c7a5760018114613c8b57613cb8565b60ff19861689528489019650613cb8565b60008d81526020902060005b86811015613cb05781548b820152908501908301613c97565b505084890196505b505050505050613cda613cd4613cce8389613c0f565b87613c0f565b85613c0f565b979650505050505050565b6020808252602a908201527f546f6b656e3a204c6173742072657665616c206d7573742062652072657175656040820152691cdd195908199a5c9cdd60b21b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906136b9908301846133ec565b600060208284031215613dc657600080fd5b81516133b981613386565b634e487b7160e01b600052603160045260246000fdfea264697066735822122060035c414521df1fe71f0564e3cfc09646d676283d87e120728bcf45b3663c2c64736f6c634300080d003368747470733a2f2f63616d656c636f64696e672e6d7970696e6174612e636c6f75642f697066732f516d55356157364d31384d346a42776e6f615236636275526f4c6b76327173367239704c4d6473735644384a395068747470733a2f2f6272617665732d6d657461646174612d7365727665722e6865726f6b756170702e636f6d2f6170692f6d657461646174612f
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061038e5760003560e01c80637f72f036116101de578063bff356181161010f578063e288e733116100ad578063e985e9c51161007c578063e985e9c51461085a578063ea9d682414610896578063f2fde38b1461089e578063f7e6347d146108b157600080fd5b8063e288e733146107ee578063e7713baa14610815578063e8a3d4851461083f578063e94193251461084757600080fd5b8063d255fe03116100e9578063d255fe0314610785578063d5abeb0114610798578063d5b014c3146107bf578063db739448146107c757600080fd5b8063bff3561814610756578063c1bd8cf914610769578063c87b56dd1461077257600080fd5b8063a22cb4651161017c578063afa88e5511610156578063afa88e5514610716578063b88d4fde14610728578063babcc5391461073b578063bcc0f7251461074e57600080fd5b8063a22cb465146106dd578063a5b3abfb146106f0578063a811a37b1461070357600080fd5b806395d89b41116101b857806395d89b41146106315780639871d6fa1461063957806398f5b238146106415780639c30ea51146106b657600080fd5b80637f72f036146105fa5780638da5cb5b1461060d578063938e3d7b1461061e57600080fd5b80632f151b76116102c35780634cf29258116102615780636cc301e3116102305780636cc301e31461059b57806370a08231146105be578063715018a6146105d157806377d4b504146105d957600080fd5b80634cf292581461053b5780634f6ccce7146105625780636352211e1461057557806369b2b9a71461058857600080fd5b806342842e0e1161029d57806342842e0e146104e6578063432e2006146104f957806344d19d2b146105015780634697f05d1461052857600080fd5b80632f151b76146104ab5780632f745c59146104c05780633d64ac9b146104d357600080fd5b806312686aae1161033057806318160ddd1161030a57806318160ddd1461046a5780631f4bc79d1461047257806323b872dd146104855780632a85db551461049857600080fd5b806312686aae14610442578063160fba561461044f57806317fd1e2f1461045757600080fd5b8063081812fc1161036c578063081812fc146103e7578063095ea7b3146104125780630e89341c1461042757806310d51dd91461043a57600080fd5b806301ffc9a7146103935780630677ef81146103bb57806306fdde03146103d2575b600080fd5b6103a66103a136600461339c565b6108d5565b60405190151581526020015b60405180910390f35b6103c4600c5481565b6040519081526020016103b2565b6103da610900565b6040516103b29190613418565b6103fa6103f536600461342b565b610992565b6040516001600160a01b0390911681526020016103b2565b610425610420366004613459565b610a2c565b005b6103c461043536600461342b565b610b41565b6103da610c07565b600f546103a69060ff1681565b6103da610c95565b610425610465366004613459565b610ca2565b6008546103c4565b6103a661048036600461342b565b610d3d565b610425610493366004613485565b610d9f565b6104256104a63660046134c6565b610dd0565b6104b3610e01565b6040516103b291906135a9565b6103c46104ce366004613459565b6111df565b6104256104e13660046136c3565b611275565b6104256104f4366004613485565b6115be565b6103c46115d9565b6103c47f000000000000000000000000000000000000000000000000000000000000000081565b6104256105363660046136f3565b611644565b6103da604051806040016040528060088152602001672920a72227a6ab1960c11b81525081565b6103c461057036600461342b565b6116d1565b6103fa61058336600461342b565b611764565b61042561059636600461372c565b6117db565b6103a66105a9366004613751565b60106020526000908152604090205460ff1681565b6103c46105cc366004613751565b61198b565b610425611a12565b6014546105e79061ffff1681565b60405161ffff90911681526020016103b2565b6105e761060836600461342b565b611a48565b600a546001600160a01b03166103fa565b61042561062c3660046137fa565b611a9c565b6103da611b0f565b610425611b1e565b61068761064f366004613843565b601160205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff1686565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c0016103b2565b6103c47f000000000000000000000000000000000000000000000000000000000000005481565b6104256106eb3660046136f3565b611d8b565b6104256106fe366004613459565b611d9a565b6104256107113660046134c6565b611e2e565b600f546103a690610100900460ff1681565b610425610736366004613867565b611e5f565b6103a6610749366004613751565b611e91565b6103da611ec8565b6104256107643660046138e7565b611ed5565b6103c4600b5481565b6103da61078036600461342b565b611f3b565b61042561079336600461372c565b6121d7565b6103c47f0000000000000000000000000000000000000000000000000000000000000dac81565b610425612365565b6103fa7f0000000000000000000000001e8150050a7a4715aad42b905c08df76883f396f81565b6103c47f000000000000000000000000000000000000000000000000000000000000000081565b61081d6123be565b60408051825181526020808401519082015291810151908201526060016103b2565b6103da612462565b61042561085536600461372c565b61246f565b6103a6610868366004613904565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6104256125f2565b6104256108ac366004613751565b61273c565b6105e76108bf36600461342b565b60126020526000908152604090205461ffff1681565b60006001600160e01b0319821663780e9d6360e01b14806108fa57506108fa826127d4565b92915050565b60606000805461090f90613932565b80601f016020809104026020016040519081016040528092919081815260200182805461093b90613932565b80156109885780601f1061095d57610100808354040283529160200191610988565b820191906000526020600020905b81548152906001019060200180831161096b57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a105760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a3782611764565b9050806001600160a01b0316836001600160a01b031603610aa45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a07565b336001600160a01b0382161480610ac05750610ac08133610868565b610b325760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a07565b610b3c8383612824565b505050565b600080610b4d83611a48565b90508061ffff16600003610b62575090919050565b61ffff81166000908152601160209081526040808320815160c08101835281548152600182015493810193909352600281015491830182905260038101546060840152600481015460808401526005015460ff16151560a0830152909190610bca9086613982565b905081608001518111610bdf57949350505050565b8160800151818360600151610bf49190613982565b610bfe919061399a565b95945050505050565b600e8054610c1490613932565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4090613932565b8015610c8d5780601f10610c6257610100808354040283529160200191610c8d565b820191906000526020600020905b815481529060010190602001808311610c7057829003601f168201915b505050505081565b60138054610c1490613932565b600a546001600160a01b03163314610ccc5760405162461bcd60e51b8152600401610a07906139b1565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610d19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c91906139e6565b6000600c54600b54610d4f9190613982565b82118015610d8a57507f0000000000000000000000000000000000000000000000000000000000000000600b54610d869190613982565b8211155b15610d9757506001919050565b506000919050565b610da93382612892565b610dc55760405162461bcd60e51b8152600401610a0790613a03565b610b3c838383612989565b610dd933611e91565b610df55760405162461bcd60e51b8152600401610a0790613a54565b610b3c600d8383613279565b610e77604051806101c001604052806060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081526020016060815260200160001515815260200160001515815260200160008152602001606081525090565b60145460009061ffff1667ffffffffffffffff811115610e9957610e9961376e565b604051908082528060200260200182016040528015610f0857816020015b610ef56040518060c0016040528060008019168152602001600081526020016000815260200160008152602001600081526020016000151581525090565b815260200190600190039081610eb75790505b50905060015b60145461ffff90811690821611610fbb5761ffff8116600090815260116020908152604091829020825160c081018452815481526001808301549382019390935260028201549381019390935260038101546060840152600481015460808401526005015460ff16151560a08301528390610f899084613a81565b61ffff1681518110610f9d57610f9d613aa4565b60200260200101819052508080610fb390613aba565b915050610f0e565b50604051806101c00160405280610fd0610900565b8152602001610fdd611b0f565b81526020017f000000000000000000000000000000000000000000000000000000000000005481526020017f0000000000000000000000000000000000000000000000000000000000000dac8152602001600b548152602001600c5481526020017f000000000000000000000000000000000000000000000000000000000000000081526020017f00000000000000000000000000000000000000000000000000000000000000008152602001600d805461109790613932565b80601f01602080910402602001604051908101604052809291908181526020018280546110c390613932565b80156111105780601f106110e557610100808354040283529160200191611110565b820191906000526020600020905b8154815290600101906020018083116110f357829003601f168201915b50505050508152602001600e805461112790613932565b80601f016020809104026020016040519081016040528092919081815260200182805461115390613932565b80156111a05780601f10611175576101008083540402835291602001916111a0565b820191906000526020600020905b81548152906001019060200180831161118357829003601f168201915b5050509183525050600f5460ff8082161515602084015261010090910416151560408201526060016111d160085490565b815260200191909152919050565b60006111ea8361198b565b821061124c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a07565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60408051808201825260088152672920a72227a6ab1960c11b60208201529051631d2e660b60e21b81526001600160a01b037f0000000000000000000000001e8150050a7a4715aad42b905c08df76883f396f16916374b9982c916112dd9190600401613418565b602060405180830381865afa1580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e9190613adb565b6001600160a01b0316336001600160a01b03161461138a5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e3a2070726f63657373282920556e617574686f7269736564206361604482015263363632b960e11b6064820152608401610a07565b60008181526012602090815260408083205461ffff168084526011909252909120600581015460ff16156114005760405162461bcd60e51b815260206004820181905260248201527f546f6b656e3a2072657665616c20616c72656164792070726f6365737365642e6044820152606401610a07565b805483900361156457611414600285613b0e565b600182018190556000036114475760038160040154620186a06114379190613b22565b6114419190613b0e565b60018201555b6014546011906000906114609060019061ffff16613a81565b61ffff1681526020810191909152604001600020600490810154600383018190559082015461148f919061399a565b816001015461149e9190613b41565b600282018190556000036114eb57600381600101546114bd9190613b0e565b6001820155600381015460048201546114d6919061399a565b81600101546114e59190613b41565b60028201555b60058101805460ff191660019081179091558101546002820154600383015460048401546040805161ffff881681526020810195909552840192909252606083015260808201527f959b44b0b513e15fb6ff0120336443b895d08969842e3aed3ac22eb9e933f7b39060a00160405180910390a16115b8565b60405162461bcd60e51b815260206004820152602360248201527f546f6b656e3a20496e636f7272656374207265717565737449642072656365696044820152621d995960ea1b6064820152608401610a07565b50505050565b610b3c83838360405180602001604052806000815250611e5f565b60007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000600b5461162a9190613982565b611634919061399a565b61163f906001613982565b905090565b600a546001600160a01b0316331461166e5760405162461bcd60e51b8152600401610a07906139b1565b6001600160a01b038216600081815260106020908152604091829020805460ff19168515159081179091558251938452908301527f64966f3fe2ac8cae5e6f7e4196d1315efafdb78a4377de3887c56fa3b9ac47cb910160405180910390a15050565b60006116dc60085490565b821061173f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a07565b6008828154811061175257611752613aa4565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806108fa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a07565b6117e433611e91565b6118005760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff16156118645760405162461bcd60e51b8152602060048201526024808201527f546f6b656e3a2043616e6e6f74206d696e74206166746572206c6173742072656044820152631d99585b60e21b6064820152608401610a07565b6118ae7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000dac61399a565b82600b546118bc9190613982565b11156119295760405162461bcd60e51b815260206004820152603660248201527f546f6b656e3a205468697320776f756c642065786365656420746865206e756d604482015275626572206f6620636172647320617661696c61626c6560501b6064820152608401610a07565b6000600b54600161193a9190613982565b905060005b8381101561196e5761195c838361195581613b55565b9450612b30565b8061196681613b55565b91505061193f565b5082600b60008282546119819190613982565b9091555050505050565b60006001600160a01b0382166119f65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a07565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611a3c5760405162461bcd60e51b8152600401610a07906139b1565b611a466000612c7e565b565b600060015b60145461ffff90811690821611611a935761ffff81166000908152601160205260409020600401548311611a815792915050565b80611a8b81613aba565b915050611a4d565b50600092915050565b611aa533611e91565b611ac15760405162461bcd60e51b8152600401610a0790613a54565b8051611ad49060159060208401906132fd565b507f74c497646a57fa0eeedc14ff6eec2da957c18c9c77881fe1aff368249b52b5c181604051611b049190613418565b60405180910390a150565b60606001805461090f90613932565b611b2733611e91565b611b435760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff1615611b6b5760405162461bcd60e51b8152600401610a0790613b6e565b60145461ffff166000908152601160205260409020600401547f0000000000000000000000000000000000000000000000000000000000000dac11611bc25760405162461bcd60e51b8152600401610a0790613bb2565b600f805461ff001916610100179055601480546000916011918391908290611bed9061ffff16613aba565b91906101000a81548161ffff021916908361ffff160217905561ffff1661ffff16815260200190815260200160002090507f0000000000000000000000000000000000000000000000000000000000000000600b54611c4c9190613982565b60048083019190915560408051808201825260088152672920a72227a6ab1960c11b60208201529051631d2e660b60e21b81526001600160a01b037f0000000000000000000000001e8150050a7a4715aad42b905c08df76883f396f16926374b9982c92611cbc92909101613418565b602060405180830381865afa158015611cd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfd9190613adb565b6001600160a01b031663c532bbac6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611d3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d609190613bf6565b90819055601454600091825260126020526040909120805461ffff191661ffff909216919091179055565b611d96338383612cd0565b5050565b600a546001600160a01b03163314611dc45760405162461bcd60e51b8152600401610a07906139b1565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b505050505050565b611e3733611e91565b611e535760405162461bcd60e51b8152600401610a0790613a54565b610b3c600e8383613279565b611e693383612892565b611e855760405162461bcd60e51b8152600401610a0790613a03565b6115b884848484612d9e565b6001600160a01b03811660009081526010602052604081205460ff16806108fa575050600a546001600160a01b0391821691161490565b600d8054610c1490613932565b611ede33611e91565b611efa5760405162461bcd60e51b8152600401610a0790613a54565b600f805460ff19168215159081179091556040519081527fe3f0ec9c4af57e69d5aeff78a5912ca25733e4458710bab2b55d0985e98aeb5e90602001611b04565b6000818152600260205260409020546060906001600160a01b0316151580611f675750611f6782610d3d565b611fb35760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e3a20546f6b656e20646f6573206e6f7420657869737400000000006044820152606401610a07565b6000611fbe83611a48565b90508061ffff1660000361205f57600d8054611fd990613932565b80601f016020809104026020016040519081016040528092919081815260200182805461200590613932565b80156120525780601f1061202757610100808354040283529160200191612052565b820191906000526020600020905b81548152906001019060200180831161203557829003601f168201915b5050505050915050919050565b61ffff81166000908152601160209081526040808320815160c08101835281548152600182015493810184905260028201549281019290925260038101546060830152600481015460808301526005015460ff16151560a0820152910361215457600d80546120cd90613932565b80601f01602080910402602001604051908101604052809291908181526020018280546120f990613932565b80156121465780601f1061211b57610100808354040283529160200191612146565b820191906000526020600020905b81548152906001019060200180831161212957829003601f168201915b505050505092505050919050565b600061215f85610b41565b90506000612176612171606484613b41565b612dd1565b9050600061218383612dd1565b90506000604051806040016040528060018152602001602f60f81b8152509050600e8382846040516020016121bb9493929190613c2b565b6040516020818303038152906040529650505050505050919050565b6121e033611e91565b6121fc5760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff166122235760405162461bcd60e51b8152600401610a0790613ce5565b61226d7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061399a565b600c54146122cb5760405162461bcd60e51b815260206004820152602560248201527f546f6b656e3a204d757374206d696e7420726573657276656420636172647320604482015264199a5c9cdd60da1b6064820152608401610a07565b60006122d56115d9565b905080831015801561230f575061230c7f000000000000000000000000000000000000000000000000000000000000000082613982565b83105b61235b5760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e3a2043617264206964206e6f7420696e2072616e676500000000006044820152606401610a07565b610b3c8284612b30565b600a546001600160a01b0316331461238f5760405162461bcd60e51b8152600401610a07906139b1565b60405133904780156108fc02916000818181858888f193505050501580156123bb573d6000803e3d6000fd5b50565b6123e260405180606001604052806000815260200160008152602001600081525090565b60405180606001604052807f000000000000000000000000000000000000000000000000000000000000005481526020017f0000000000000000000000000000000000000000000000000000000000000dac81526020017f0000000000000000000000000000000000000000000000000000000000000000815250905090565b60158054610c1490613932565b61247833611e91565b6124945760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff166124bb5760405162461bcd60e51b8152600401610a0790613ce5565b6125057f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061399a565b82600c546125139190613982565b11156125955760405162461bcd60e51b815260206004820152604560248201527f546f6b656e3a205468697320776f756c642065786365656420746865206e756d60448201527f626572206f6620636172647320726573657276656420636172647320617661696064820152646c61626c6560d81b608482015260a401610a07565b6000600c54600b546125a79190613982565b6125b2906001613982565b905060005b838110156125df576125cd838361195581613b55565b806125d781613b55565b9150506125b7565b5082600c60008282546119819190613982565b6125fb33611e91565b6126175760405162461bcd60e51b8152600401610a0790613a54565b600f54610100900460ff161561263f5760405162461bcd60e51b8152600401610a0790613b6e565b600b5460145461ffff16600090815260116020526040902060040154106126785760405162461bcd60e51b8152600401610a0790613bb2565b6014805460009160119183919082906126949061ffff16613aba565b91906101000a81548161ffff021916908361ffff160217905561ffff1661ffff1681526020019081526020016000209050600b5481600401819055507f0000000000000000000000001e8150050a7a4715aad42b905c08df76883f396f6001600160a01b03166374b9982c604051806040016040528060088152602001672920a72227a6ab1960c11b8152506040518263ffffffff1660e01b8152600401611cbc9190613418565b600a546001600160a01b031633146127665760405162461bcd60e51b8152600401610a07906139b1565b6001600160a01b0381166127cb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a07565b6123bb81612c7e565b60006001600160e01b031982166380ac58cd60e01b148061280557506001600160e01b03198216635b5e139f60e01b145b806108fa57506301ffc9a760e01b6001600160e01b03198316146108fa565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061285982611764565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661290b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a07565b600061291683611764565b9050806001600160a01b0316846001600160a01b0316148061295d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806129815750836001600160a01b031661297684610992565b6001600160a01b0316145b949350505050565b826001600160a01b031661299c82611764565b6001600160a01b031614612a005760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a07565b6001600160a01b038216612a625760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a07565b612a6d838383612ed2565b612a78600082612824565b6001600160a01b0383166000908152600360205260408120805460019290612aa190849061399a565b90915550506001600160a01b0382166000908152600360205260408120805460019290612acf908490613982565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216612b865760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a07565b6000818152600260205260409020546001600160a01b031615612beb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a07565b612bf760008383612ed2565b6001600160a01b0382166000908152600360205260408120805460019290612c20908490613982565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031603612d315760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a07565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612da9848484612989565b612db584848484612f30565b6115b85760405162461bcd60e51b8152600401610a0790613d2f565b606081600003612df85750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612e225780612e0c81613b55565b9150612e1b9050600a83613b0e565b9150612dfc565b60008167ffffffffffffffff811115612e3d57612e3d61376e565b6040519080825280601f01601f191660200182016040528015612e67576020820181803683370190505b5090505b841561298157612e7c60018361399a565b9150612e89600a86613b41565b612e94906030613982565b60f81b818381518110612ea957612ea9613aa4565b60200101906001600160f81b031916908160001a905350612ecb600a86613b0e565b9450612e6b565b600f5460ff1615612f255760405162461bcd60e51b815260206004820181905260248201527f546f6b656e3a205472616e736665727320617265206e6f7420656e61626c65646044820152606401610a07565b610b3c838383613031565b60006001600160a01b0384163b1561302657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f74903390899088908890600401613d81565b6020604051808303816000875af1925050508015612faf575060408051601f3d908101601f19168201909252612fac91810190613db4565b60015b61300c573d808015612fdd576040519150601f19603f3d011682016040523d82523d6000602084013e612fe2565b606091505b5080516000036130045760405162461bcd60e51b8152600401610a0790613d2f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612981565b506001949350505050565b6001600160a01b03831661308c5761308781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6130af565b816001600160a01b0316836001600160a01b0316146130af576130af83826130e9565b6001600160a01b0382166130c657610b3c81613186565b826001600160a01b0316826001600160a01b031614610b3c57610b3c8282613235565b600060016130f68461198b565b613100919061399a565b600083815260076020526040902054909150808214613153576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906131989060019061399a565b600083815260096020526040812054600880549394509092849081106131c0576131c0613aa4565b9060005260206000200154905080600883815481106131e1576131e1613aa4565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061321957613219613dd1565b6001900381819060005260206000200160009055905550505050565b60006132408361198b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461328590613932565b90600052602060002090601f0160209004810192826132a757600085556132ed565b82601f106132c05782800160ff198235161785556132ed565b828001600101855582156132ed579182015b828111156132ed5782358255916020019190600101906132d2565b506132f9929150613371565b5090565b82805461330990613932565b90600052602060002090601f01602090048101928261332b57600085556132ed565b82601f1061334457805160ff19168380011785556132ed565b828001600101855582156132ed579182015b828111156132ed578251825591602001919060010190613356565b5b808211156132f95760008155600101613372565b6001600160e01b0319811681146123bb57600080fd5b6000602082840312156133ae57600080fd5b81356133b981613386565b9392505050565b60005b838110156133db5781810151838201526020016133c3565b838111156115b85750506000910152565b600081518084526134048160208601602086016133c0565b601f01601f19169290920160200192915050565b6020815260006133b960208301846133ec565b60006020828403121561343d57600080fd5b5035919050565b6001600160a01b03811681146123bb57600080fd5b6000806040838503121561346c57600080fd5b823561347781613444565b946020939093013593505050565b60008060006060848603121561349a57600080fd5b83356134a581613444565b925060208401356134b581613444565b929592945050506040919091013590565b600080602083850312156134d957600080fd5b823567ffffffffffffffff808211156134f157600080fd5b818501915085601f83011261350557600080fd5b81358181111561351457600080fd5b86602082850101111561352657600080fd5b60209290920196919550909350505050565b600081518084526020808501945080840160005b8381101561359e57815180518852838101518489015260408082015190890152606080820151908901526080808201519089015260a09081015115159088015260c0909601959082019060010161354c565b509495945050505050565b60208152600082516101c08060208501526135c86101e08501836133ec565b91506020850151601f19808685030160408701526135e684836133ec565b93506040870151606087015260608701516080870152608087015160a087015260a087015160c087015260c087015160e087015260e0870151915061010082818801528088015192505061012081878603018188015261364685846133ec565b94508088015192505061014081878603018188015261366585846133ec565b94508088015192505061016061367e8188018415159052565b87015191506101806136938782018415159052565b8701516101a0878101919091528701518685039091018387015290506136b98382613538565b9695505050505050565b600080604083850312156136d657600080fd5b50508035926020909101359150565b80151581146123bb57600080fd5b6000806040838503121561370657600080fd5b823561371181613444565b91506020830135613721816136e5565b809150509250929050565b6000806040838503121561373f57600080fd5b82359150602083013561372181613444565b60006020828403121561376357600080fd5b81356133b981613444565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561379f5761379f61376e565b604051601f8501601f19908116603f011681019082821181831017156137c7576137c761376e565b816040528093508581528686860111156137e057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561380c57600080fd5b813567ffffffffffffffff81111561382357600080fd5b8201601f8101841361383457600080fd5b61298184823560208401613784565b60006020828403121561385557600080fd5b813561ffff811681146133b957600080fd5b6000806000806080858703121561387d57600080fd5b843561388881613444565b9350602085013561389881613444565b925060408501359150606085013567ffffffffffffffff8111156138bb57600080fd5b8501601f810187136138cc57600080fd5b6138db87823560208401613784565b91505092959194509250565b6000602082840312156138f957600080fd5b81356133b9816136e5565b6000806040838503121561391757600080fd5b823561392281613444565b9150602083013561372181613444565b600181811c9082168061394657607f821691505b60208210810361396657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156139955761399561396c565b500190565b6000828210156139ac576139ac61396c565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156139f857600080fd5b81516133b9816136e5565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260139082015272151bdad95b8e88155b985d5d1a1bdc9a5cd959606a1b604082015260600190565b600061ffff83811690831681811015613a9c57613a9c61396c565b039392505050565b634e487b7160e01b600052603260045260246000fd5b600061ffff808316818103613ad157613ad161396c565b6001019392505050565b600060208284031215613aed57600080fd5b81516133b981613444565b634e487b7160e01b600052601260045260246000fd5b600082613b1d57613b1d613af8565b500490565b6000816000190483118215151615613b3c57613b3c61396c565b500290565b600082613b5057613b50613af8565b500690565b600060018201613b6757613b6761396c565b5060010190565b60208082526024908201527f546f6b656e3a204c6173742072657665616c20616c72656164792072657175656040820152631cdd195960e21b606082015260800190565b60208082526024908201527f546f6b656e3a2052657665616c207265717565737420616c72656164792065786040820152636973747360e01b606082015260800190565b600060208284031215613c0857600080fd5b5051919050565b60008151613c218185602086016133c0565b9290920192915050565b600080865481600182811c915080831680613c4757607f831692505b60208084108203613c6657634e487b7160e01b86526022600452602486fd5b818015613c7a5760018114613c8b57613cb8565b60ff19861689528489019650613cb8565b60008d81526020902060005b86811015613cb05781548b820152908501908301613c97565b505084890196505b505050505050613cda613cd4613cce8389613c0f565b87613c0f565b85613c0f565b979650505050505050565b6020808252602a908201527f546f6b656e3a204c6173742072657665616c206d7573742062652072657175656040820152691cdd195908199a5c9cdd60b21b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906136b9908301846133ec565b600060208284031215613dc657600080fd5b81516133b981613386565b634e487b7160e01b600052603160045260246000fdfea264697066735822122060035c414521df1fe71f0564e3cfc09646d676283d87e120728bcf45b3663c2c64736f6c634300080d0033
Loading...
Loading
Loading...
Loading
[ 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.