Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
1,440 WSB
Holders
680
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 WSBLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
WSBToken
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./WSBSwappable.sol"; // .::-++**#:...:=+#%--===-:...+%#:..:: // :-- .+=::::-+#%*+--=+=-+*--: +=. // .::.: .:+%@**+:. =%@%%%@#. :.. .++.++.. // ..:. : ....=#=. :%@@@@#+*. .+@@@. :*=.. // *-:*+==:#*++:..:-::::::::-=++++****%@#####**+=###--=-*. // .... .-+-. +#*++=-:.-=@@@@@@@@%%@@@%+-+%@#..==.. // ..:: .:.. .-*+:-=*@@@: %+. .-%%@@#-:+@@@-:=-. // .-: :.:=*#: : :@# - =%@*:.=%@@+:-:. // .=: :=+=*: . %- -: .#*:.:::-:::. // .--.-= :- . %+#@@* +:.:. ..:. // --=*. ....-+:.:@@. -:. .-:. // :+%* ::-+ %@*=: :- // +:=*.. =. ** .. // +... *. * ::. // #-. +-.:-:*==- - // -%- +: .+%%#*: = // %: * -*#+:.:: // -. =- :+= =: // -+: :@@ +- =: // -#. -:=%@= =. =- // -%-=. :+*+. =. .+ // :@#: .-+*=:+%# .+: // :@+ .:.: :-*#@# **. // =%* -: -=:.::=++:. =%- // -@#-- .-==-. :--= =% // .@%= .=. ..:-=::=%=. :@. // .@=. ..-@#++. ..-%:..:. -@= // -*=. :. --::.:. .:-.:*+* // @#+=-: . :++%%+.* // -#%#*=: :*#%@=.:- // -+#%#+-:. .*#%@%+ + // .-+%@%#*+=----=+#%%%@@%= .:: // :=*%@@@@%%@@@@@@%#+:-.+ // :=%@@@@@@@%%%*--:# // #@@@@@@%%%#=:++. // -@@@@@@%%%#+-*-- // :@@@@@%%%%%#**.* // // Run It Wild + PrimeFlare contract WSBToken is IERC721Receiver, ReentrancyGuard, Ownable, WSBSwappable { using SafeMath for uint256; uint16 public constant MAX_RAFFLE = 1194; uint16 public constant MAX_TOKEN = 7375; uint16 public constant MAX_DEV_CLAIMA = 7475; uint16 public constant MAX_DEV_CLAIMB = 7500; uint16 public constant MAX_PER_CLAIM = 10; uint256 public constant BUY_PRICE = 0.1 ether; uint16 private publicTokens = 1194; string public baseURI = "ipfs://bafybeihecf5alieuoojmghsvtdymxul6jbj6eeagnaewij4cjkjetcka4m/"; PresaleContract public presaleContract; bool public active = false; bool public raffleDrawn = false; address public svgLink; uint256 private raffleSeed; address payable private ownerA = payable(0xB240D3aAD9093a08B62ce96343d8A47e22266AdD); address payable private ownerB = payable(0x75dF311CE8E000CaDD8E4382B42483530bCC6355); address payable private ownerC = payable(0x724696c017902944ADD5916eA36776435c64B306); constructor() ERC721("WSB Diamond Hands", "WSB") {} receive() external payable onlyOwner {} function drawRaffle() external onlyOwner { require(tx.origin == msg.sender, "Draw: Can not be called using a contract."); require(!raffleDrawn, "Draw: Can only draw raffle once"); // pseudo random to generate seed, offset max presale to prevent overflow raffleSeed = uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty, block.coinbase, msg.sender, MAX_RAFFLE, address(this)))).sub(MAX_RAFFLE); // ensuring draw can only happen once raffleDrawn = true; } function claimRaffle(uint8 amount) external nonReentrant { require(active, "ClaimRaffle: We are not yet open."); require(tx.origin == msg.sender, "ClaimRaffle: Can not be called using a contract."); require(raffleDrawn, "ClaimRaffle: Raffle has not been drawn."); uint8 balance = uint8(presaleContract.balanceOf(msg.sender)); require(balance > 0, "ClaimRaffle: Need pre-mint to claim."); amount = amount < balance ? amount : balance; while (amount > 0) { uint16 presaleTokenId = uint16(presaleContract.tokenOfOwnerByIndex(msg.sender, 0)); uint16 raffleTokenIndex = getRaffleEntry(presaleTokenId); _safeMint(msg.sender, raffleTokenIndex); presaleContract.burnRedeem(presaleTokenId); amount -= 1; } } function claim(uint256 amount) external payable nonReentrant { require(active, "ClaimToken: We are not yet open."); require(tx.origin == msg.sender, "ClaimToken: Can not be called using a contract."); require(msg.value >= BUY_PRICE.mul(amount), "ClaimToken: Not enough ETH to claim."); require(amount > 0, "ClaimToken: Need to claim at least 1."); require(amount <= MAX_PER_CLAIM, "ClaimToken: You can claim at most 10."); require((publicTokens + amount) < MAX_TOKEN, "ClaimToken: All tokens are claimed."); for(uint16 i = 0; i < amount; i++){ _safeMint(msg.sender, publicTokens); publicTokens = publicTokens + 1; } } function claimDevTokensA() external onlyOwner { for(uint16 i = MAX_TOKEN; i < MAX_DEV_CLAIMA; i++){ _safeMint(ownerA, i); } } function claimDevTokensB() external onlyOwner { for(uint16 i = MAX_DEV_CLAIMA; i < MAX_DEV_CLAIMB; i++){ _safeMint(ownerB, i); } } function anyRaffle() external view returns(bool) { return uint256(presaleContract.balanceOf(msg.sender)) > 0; } function toggleActive() external onlyOwner { active = !active; } function setPresaleContract(address contractAddress) external onlyOwner { presaleContract = PresaleContract(contractAddress); } function setSvgLink(address contractAddress) external onlyOwner { svgLink = contractAddress; } function withdraw() public onlyOwner { uint balanceA = address(this).balance.mul(550).div(1000); uint balanceB = address(this).balance.mul(350).div(1000); uint balanceC = address(this).balance.sub(balanceA).sub(balanceB); ownerA.transfer(balanceA); ownerB.transfer(balanceB); ownerC.transfer(balanceC); } function withdrawOperational() public onlyOwner { require(!active, "Can not withdraw"); uint balance = address(this).balance; address payable owner = payable(msg.sender); owner.transfer(balance); } function onERC721Received(address, address, uint256, bytes memory) public pure override returns (bytes4) { return this.onERC721Received.selector; } function getRaffleEntry(uint16 presaleTokenId) private view returns (uint16) { return uint16(raffleSeed.add(uint256(presaleContract.getTokenValue(presaleTokenId))) % MAX_RAFFLE); } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); return string(abi.encodePacked(baseURI, Strings.toString(tokenId))); } function setTokenURI(string memory uri) external onlyOwner { baseURI = uri; } } interface PresaleContract { function burnRedeem(uint256 amount) external; function balanceOf(address account) external view returns (uint256); function tokenOfOwnerByIndex(address account, uint256 index) external view returns (uint256); function getTokenValue(uint16 tokenId) external pure returns (uint16); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; abstract contract WSBSwappable is ERC721Enumerable, Ownable { event SwapTo(address indexed owner, uint256 indexed tokenId, uint256 nonce); event SwapFrom(address indexed owner, uint256 indexed tokenId, uint256 nonce); using SafeMath for uint256; using Counters for Counters.Counter; bool public swapActive = false; uint256 public swapPrice = 10000000000000000; // 0.01 ether; Counters.Counter private swapNonce; function toggleSwapActive() external onlyOwner { swapActive = !swapActive; } function updateSwapPrice(uint256 price) external onlyOwner { swapPrice = price; } function swapTo(uint256 tokenId) external payable { require(tx.origin == msg.sender, "Swap: Can not be called using a contract."); require(swapActive, "Swap: Feature is not active."); require(ERC721.ownerOf(tokenId) == msg.sender, "Swap: Only owner can swap the token."); require(msg.value >= swapPrice, "Swap: Insufficient funds for swapping."); address owner = ERC721.ownerOf(tokenId); ERC721._safeTransfer(owner, address(this), tokenId, ""); swapNonce.increment(); emit SwapTo(owner, tokenId, swapNonce.current()); } function swapFrom(address owner, uint256 tokenId) external onlyOwner { require(tx.origin == msg.sender, "Swap: Can not be called using a contract."); require(swapActive, "Swap: Feature is not active."); require(!ERC721._exists(tokenId) || ERC721.ownerOf(tokenId) == address(this), "Swap: This token is not swappable."); if (!ERC721._exists(tokenId)) { ERC721._safeMint(owner, tokenId); } else { ERC721._safeTransfer(address(this), owner, tokenId, ""); } swapNonce.increment(); emit SwapFrom(owner, tokenId, swapNonce.current()); } function exists(uint256 tokenId) external view returns (bool) { return ERC721._exists(tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"SwapFrom","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"SwapTo","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":"BUY_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEV_CLAIMA","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_DEV_CLAIMB","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_CLAIM","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RAFFLE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKEN","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anyRaffle","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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimDevTokensA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimDevTokensB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"claimRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"drawRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleContract","outputs":[{"internalType":"contract PresaleContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleDrawn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setPresaleContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"setSvgLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","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":"svgLink","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"swapFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"swapTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSwapActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"updateSwapPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawOperational","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
600b805460ff60a01b19169055662386f26fc10000600c55600e805461ffff19166104aa17905561010060405260436080818152906200369060a03980516200005191600f91602090910190620001bc565b506010805461ffff60a01b19169055601380546001600160a01b031990811673b240d3aad9093a08b62ce96343d8a47e22266add179091556014805482167375df311ce8e000cadd8e4382b42483530bcc63551790556015805490911673724696c017902944add5916ea36776435c64b306179055348015620000d357600080fd5b506040805180820182526011815270575342204469616d6f6e642048616e647360781b6020808301918252835180850190945260038452622ba9a160e91b908401526001600081905582519293926200012d9290620001bc565b50805162000143906002906020840190620001bc565b505050620001606200015a6200016660201b60201c565b6200016a565b6200029f565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001ca9062000262565b90600052602060002090601f016020900481019282620001ee576000855562000239565b82601f106200020957805160ff191683800117855562000239565b8280016001018555821562000239579182015b82811115620002395782518255916020019190600101906200021c565b50620002479291506200024b565b5090565b5b808211156200024757600081556001016200024c565b600181811c908216806200027757607f821691505b602082108114156200029957634e487b7160e01b600052602260045260246000fd5b50919050565b6133e180620002af6000396000f3fe6080604052600436106102cd5760003560e01c806363d9df851161017557806395d89b41116100dc578063bf3953f311610095578063d6dacb441161006f578063d6dacb4414610852578063e0df5b6f14610873578063e985e9c514610893578063f2fde38b146108dc57600080fd5b8063bf3953f3146107fd578063c87b56dd1461081d578063d0e272d01461083d57600080fd5b806395d89b411461075d5780639a40b1ea14610772578063a22cb46514610788578063a9bbd114146107a8578063af447380146107c8578063b88d4fde146107dd57600080fd5b806370a082311161012e57806370a08231146106bf578063715018a6146106df57806375cfbb82146106f457806384dfc9751461070a5780638da5cb5b1461072a57806390d8434d1461074857600080fd5b806363d9df851461062d5780636831e0d81461064d5780636ba14d56146106635780636c0360eb146106785780636e1bd3231461068d578063705fe4be146106a357600080fd5b806323b872dd116102345780633ccfd60b116101ed5780634f558e79116101c75780634f558e79146105b85780634f6ccce7146105d85780635471f49f146105f85780636352211e1461060d57600080fd5b80633ccfd60b1461056357806342842e0e146105785780634cadae1b1461059857600080fd5b806323b872dd146104c85780632793b707146104e857806329c68dc1146104fb5780632f745c5914610510578063317f406c14610530578063379607f51461055057600080fd5b80630ebe7d11116102865780630ebe7d11146103f15780631382e2201461041a578063150b7a021461043a57806318160ddd1461047357806318270a0f146104925780632275aea9146104b357600080fd5b806301ffc9a71461030c57806302fb0c5e1461034157806306fdde0314610362578063081812fc14610384578063095ea7b3146103bc5780630bf46dcd146103dc57600080fd5b3661030757600b546001600160a01b031633146103055760405162461bcd60e51b81526004016102fc9061313e565b60405180910390fd5b005b600080fd5b34801561031857600080fd5b5061032c610327366004612e68565b6108fc565b60405190151581526020015b60405180910390f35b34801561034d57600080fd5b5060105461032c90600160a01b900460ff1681565b34801561036e57600080fd5b50610377610927565b6040516103389190613090565b34801561039057600080fd5b506103a461039f366004612f0f565b6109b9565b6040516001600160a01b039091168152602001610338565b3480156103c857600080fd5b506103056103d7366004612e3e565b610a41565b3480156103e857600080fd5b50610305610b57565b3480156103fd57600080fd5b506104076104aa81565b60405161ffff9091168152602001610338565b34801561042657600080fd5b506011546103a4906001600160a01b031681565b34801561044657600080fd5b5061045a610455366004612d86565b610ba2565b6040516001600160e01b03199091168152602001610338565b34801561047f57600080fd5b506009545b604051908152602001610338565b34801561049e57600080fd5b5060105461032c90600160a81b900460ff1681565b3480156104bf57600080fd5b50610305610bb3565b3480156104d457600080fd5b506103056104e3366004612d4a565b610d23565b6103056104f6366004612f0f565b610d54565b34801561050757600080fd5b50610305610f1a565b34801561051c57600080fd5b5061048461052b366004612e3e565b610f65565b34801561053c57600080fd5b5061030561054b366004612f0f565b610ffb565b61030561055e366004612f0f565b61102a565b34801561056f57600080fd5b5061030561133f565b34801561058457600080fd5b50610305610593366004612d4a565b611468565b3480156105a457600080fd5b506103056105b3366004612f41565b611483565b3480156105c457600080fd5b5061032c6105d3366004612f0f565b611824565b3480156105e457600080fd5b506104846105f3366004612f0f565b61182f565b34801561060457600080fd5b50610407600a81565b34801561061957600080fd5b506103a4610628366004612f0f565b6118c2565b34801561063957600080fd5b506010546103a4906001600160a01b031681565b34801561065957600080fd5b50610484600c5481565b34801561066f57600080fd5b50610305611939565b34801561068457600080fd5b506103776119e1565b34801561069957600080fd5b50610407611ccf81565b3480156106af57600080fd5b5061048467016345785d8a000081565b3480156106cb57600080fd5b506104846106da366004612cfc565b611a6f565b3480156106eb57600080fd5b50610305611af6565b34801561070057600080fd5b50610407611d4c81565b34801561071657600080fd5b50610305610725366004612e3e565b611b2c565b34801561073657600080fd5b50600b546001600160a01b03166103a4565b34801561075457600080fd5b50610305611cc4565b34801561076957600080fd5b50610377611d2f565b34801561077e57600080fd5b50610407611d3381565b34801561079457600080fd5b506103056107a3366004612e02565b611d3e565b3480156107b457600080fd5b506103056107c3366004612cfc565b611dfc565b3480156107d457600080fd5b50610305611e48565b3480156107e957600080fd5b506103056107f8366004612d86565b611eb0565b34801561080957600080fd5b50610305610818366004612cfc565b611ee2565b34801561082957600080fd5b50610377610838366004612f0f565b611f2e565b34801561084957600080fd5b5061032c611fcf565b34801561085e57600080fd5b50600b5461032c90600160a01b900460ff1681565b34801561087f57600080fd5b5061030561088e366004612ea2565b612055565b34801561089f57600080fd5b5061032c6108ae366004612d17565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108e857600080fd5b506103056108f7366004612cfc565b612096565b60006001600160e01b0319821663780e9d6360e01b148061092157506109218261212e565b92915050565b6060600180546109369061329b565b80601f01602080910402602001604051908101604052809291908181526020018280546109629061329b565b80156109af5780601f10610984576101008083540402835291602001916109af565b820191906000526020600020905b81548152906001019060200180831161099257829003601f168201915b5050505050905090565b60006109c48261217e565b610a255760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016102fc565b506000908152600560205260409020546001600160a01b031690565b6000610a4c826118c2565b9050806001600160a01b0316836001600160a01b03161415610aba5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016102fc565b336001600160a01b0382161480610ad65750610ad681336108ae565b610b485760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016102fc565b610b52838361219b565b505050565b600b546001600160a01b03163314610b815760405162461bcd60e51b81526004016102fc9061313e565b600b805460ff60a01b198116600160a01b9182900460ff1615909102179055565b630a85bd0160e11b5b949350505050565b600b546001600160a01b03163314610bdd5760405162461bcd60e51b81526004016102fc9061313e565b323314610c3e5760405162461bcd60e51b815260206004820152602960248201527f447261773a2043616e206e6f742062652063616c6c6564207573696e6720612060448201526831b7b73a3930b1ba1760b91b60648201526084016102fc565b601054600160a81b900460ff1615610c985760405162461bcd60e51b815260206004820152601f60248201527f447261773a2043616e206f6e6c79206472617720726166666c65206f6e63650060448201526064016102fc565b6040805142602082015244918101919091526bffffffffffffffffffffffff1941606090811b82168184015233811b8216607484015261025560f11b608884015230901b16608a820152610d0b906104aa90609e0160408051601f19818403018152919052805160209091012090612209565b6012556010805460ff60a81b1916600160a81b179055565b610d2d338261221c565b610d495760405162461bcd60e51b81526004016102fc90613173565b610b52838383612302565b323314610d735760405162461bcd60e51b81526004016102fc906130f5565b600b54600160a01b900460ff16610dcc5760405162461bcd60e51b815260206004820152601c60248201527f537761703a2046656174757265206973206e6f74206163746976652e0000000060448201526064016102fc565b33610dd6826118c2565b6001600160a01b031614610e385760405162461bcd60e51b8152602060048201526024808201527f537761703a204f6e6c79206f776e65722063616e20737761702074686520746f60448201526335b2b71760e11b60648201526084016102fc565b600c54341015610e995760405162461bcd60e51b815260206004820152602660248201527f537761703a20496e73756666696369656e742066756e647320666f7220737761604482015265383834b7339760d11b60648201526084016102fc565b6000610ea4826118c2565b9050610ec1813084604051806020016040528060008152506124ad565b610ecf600d80546001019055565b81816001600160a01b03167f466fe93b786bec51d5456ba8e9f736b265ed36ff65471dcb8a768cd9806300c5610f04600d5490565b6040519081526020015b60405180910390a35050565b600b546001600160a01b03163314610f445760405162461bcd60e51b81526004016102fc9061313e565b6010805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000610f7083611a6f565b8210610fd25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016102fc565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b600b546001600160a01b031633146110255760405162461bcd60e51b81526004016102fc9061313e565b600c55565b6002600054141561107d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102fc565b6002600055601054600160a01b900460ff166110db5760405162461bcd60e51b815260206004820181905260248201527f436c61696d546f6b656e3a20576520617265206e6f7420796574206f70656e2e60448201526064016102fc565b3233146111425760405162461bcd60e51b815260206004820152602f60248201527f436c61696d546f6b656e3a2043616e206e6f742062652063616c6c656420757360448201526e34b73390309031b7b73a3930b1ba1760891b60648201526084016102fc565b61115467016345785d8a0000826124e0565b3410156111af5760405162461bcd60e51b8152602060048201526024808201527f436c61696d546f6b656e3a204e6f7420656e6f7567682045544820746f20636c60448201526330b4b69760e11b60648201526084016102fc565b6000811161120d5760405162461bcd60e51b815260206004820152602560248201527f436c61696d546f6b656e3a204e65656420746f20636c61696d206174206c656160448201526439ba10189760d91b60648201526084016102fc565b600a81111561126c5760405162461bcd60e51b815260206004820152602560248201527f436c61696d546f6b656e3a20596f752063616e20636c61696d206174206d6f736044820152643a1018981760d91b60648201526084016102fc565b600e54611ccf9061128290839061ffff166131ea565b106112db5760405162461bcd60e51b815260206004820152602360248201527f436c61696d546f6b656e3a20416c6c20746f6b656e732061726520636c61696d60448201526232b21760e91b60648201526084016102fc565b60005b818161ffff16101561133657600e546112fc90339061ffff166124ec565b600e5461130e9061ffff1660016131c4565b600e805461ffff191661ffff929092169190911790558061132e816132d6565b9150506112de565b50506001600055565b600b546001600160a01b031633146113695760405162461bcd60e51b81526004016102fc9061313e565b60006113836103e861137d476102266124e0565b90612506565b905060006113996103e861137d4761015e6124e0565b905060006113b1826113ab4786612209565b90612209565b6013546040519192506001600160a01b03169084156108fc029085906000818181858888f193505050501580156113ec573d6000803e3d6000fd5b506014546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015611427573d6000803e3d6000fd5b506015546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611462573d6000803e3d6000fd5b50505050565b610b5283838360405180602001604052806000815250611eb0565b600260005414156114d65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102fc565b6002600055601054600160a01b900460ff1661153e5760405162461bcd60e51b815260206004820152602160248201527f436c61696d526166666c653a20576520617265206e6f7420796574206f70656e6044820152601760f91b60648201526084016102fc565b3233146115a65760405162461bcd60e51b815260206004820152603060248201527f436c61696d526166666c653a2043616e206e6f742062652063616c6c6564207560448201526f39b4b73390309031b7b73a3930b1ba1760811b60648201526084016102fc565b601054600160a81b900460ff1661160f5760405162461bcd60e51b815260206004820152602760248201527f436c61696d526166666c653a20526166666c6520686173206e6f74206265656e60448201526610323930bbb71760c91b60648201526084016102fc565b6010546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561165357600080fd5b505afa158015611667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168b9190612f28565b905060008160ff16116116ec5760405162461bcd60e51b8152602060048201526024808201527f436c61696d526166666c653a204e656564207072652d6d696e7420746f20636c60448201526330b4b69760e11b60648201526084016102fc565b8060ff168260ff16106116ff5780611701565b815b91505b60ff82161561133657601054604051632f745c5960e01b8152336004820152600060248201819052916001600160a01b031690632f745c599060440160206040518083038186803b15801561175857600080fd5b505afa15801561176c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117909190612f28565b9050600061179d82612512565b90506117ad338261ffff166124ec565b601054604051630c67836160e21b815261ffff841660048201526001600160a01b039091169063319e0d8490602401600060405180830381600087803b1580156117f657600080fd5b505af115801561180a573d6000803e3d6000fd5b5050505060018461181b919061324c565b93505050611704565b60006109218261217e565b600061183a60095490565b821061189d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016102fc565b600982815481106118b0576118b0613369565b90600052602060002001549050919050565b6000818152600360205260408120546001600160a01b0316806109215760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016102fc565b600b546001600160a01b031633146119635760405162461bcd60e51b81526004016102fc9061313e565b601054600160a01b900460ff16156119b05760405162461bcd60e51b815260206004820152601060248201526f43616e206e6f7420776974686472617760801b60448201526064016102fc565b60405147903390819083156108fc029084906000818181858888f19350505050158015610b52573d6000803e3d6000fd5b600f80546119ee9061329b565b80601f0160208091040260200160405190810160405280929190818152602001828054611a1a9061329b565b8015611a675780601f10611a3c57610100808354040283529160200191611a67565b820191906000526020600020905b815481529060010190602001808311611a4a57829003601f168201915b505050505081565b60006001600160a01b038216611ada5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016102fc565b506001600160a01b031660009081526004602052604090205490565b600b546001600160a01b03163314611b205760405162461bcd60e51b81526004016102fc9061313e565b611b2a60006125b1565b565b600b546001600160a01b03163314611b565760405162461bcd60e51b81526004016102fc9061313e565b323314611b755760405162461bcd60e51b81526004016102fc906130f5565b600b54600160a01b900460ff16611bce5760405162461bcd60e51b815260206004820152601c60248201527f537761703a2046656174757265206973206e6f74206163746976652e0000000060448201526064016102fc565b611bd78161217e565b1580611bf3575030611be8826118c2565b6001600160a01b0316145b611c4a5760405162461bcd60e51b815260206004820152602260248201527f537761703a205468697320746f6b656e206973206e6f7420737761707061626c604482015261329760f11b60648201526084016102fc565b611c538161217e565b611c6657611c6182826124ec565b611c81565b611c81308383604051806020016040528060008152506124ad565b611c8f600d80546001019055565b80826001600160a01b03167fde7642f738fd739dbffaec304ed06de0189979c99f546d149ce2f54935859d70610f04600d5490565b600b546001600160a01b03163314611cee5760405162461bcd60e51b81526004016102fc9061313e565b611ccf5b611d3361ffff82161015611d2c57601354611d1a906001600160a01b031661ffff83166124ec565b80611d24816132d6565b915050611cf2565b50565b6060600280546109369061329b565b6001600160a01b038216331415611d975760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016102fc565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101610f0e565b600b546001600160a01b03163314611e265760405162461bcd60e51b81526004016102fc9061313e565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b600b546001600160a01b03163314611e725760405162461bcd60e51b81526004016102fc9061313e565b611d335b611d4c61ffff82161015611d2c57601454611e9e906001600160a01b031661ffff83166124ec565b80611ea8816132d6565b915050611e76565b611eba338361221c565b611ed65760405162461bcd60e51b81526004016102fc90613173565b611462848484846124ad565b600b546001600160a01b03163314611f0c5760405162461bcd60e51b81526004016102fc9061313e565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6060611f398261217e565b611f9d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016102fc565b600f611fa883612603565b604051602001611fb9929190612fac565b6040516020818303038152906040529050919050565b6010546040516370a0823160e01b815233600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b15801561201757600080fd5b505afa15801561202b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204f9190612f28565b11905090565b600b546001600160a01b0316331461207f5760405162461bcd60e51b81526004016102fc9061313e565b805161209290600f906020840190612bd1565b5050565b600b546001600160a01b031633146120c05760405162461bcd60e51b81526004016102fc9061313e565b6001600160a01b0381166121255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102fc565b611d2c816125b1565b60006001600160e01b031982166380ac58cd60e01b148061215f57506001600160e01b03198216635b5e139f60e01b145b8061092157506301ffc9a760e01b6001600160e01b0319831614610921565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121d0826118c2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006122158284613235565b9392505050565b60006122278261217e565b6122885760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016102fc565b6000612293836118c2565b9050806001600160a01b0316846001600160a01b031614806122ce5750836001600160a01b03166122c3846109b9565b6001600160a01b0316145b80610bab57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff16610bab565b826001600160a01b0316612315826118c2565b6001600160a01b03161461237d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016102fc565b6001600160a01b0382166123df5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016102fc565b6123ea838383612701565b6123f560008261219b565b6001600160a01b038316600090815260046020526040812080546001929061241e908490613235565b90915550506001600160a01b038216600090815260046020526040812080546001929061244c9084906131ea565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6124b8848484612302565b6124c4848484846127b9565b6114625760405162461bcd60e51b81526004016102fc906130a3565b60006122158284613216565b6120928282604051806020016040528060008152506128c3565b60006122158284613202565b60105460405163669f965960e11b815261ffff831660048201526000916104aa916125a7916001600160a01b03169063cd3f2cb29060240160206040518083038186803b15801561256257600080fd5b505afa158015612576573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061259a9190612eeb565b6012549061ffff166128f6565b6109219190613313565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060816126275750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612651578061263b816132f8565b915061264a9050600a83613202565b915061262b565b60008167ffffffffffffffff81111561266c5761266c61337f565b6040519080825280601f01601f191660200182016040528015612696576020820181803683370190505b5090505b8415610bab576126ab600183613235565b91506126b8600a86613313565b6126c39060306131ea565b60f81b8183815181106126d8576126d8613369565b60200101906001600160f81b031916908160001a9053506126fa600a86613202565b945061269a565b6001600160a01b03831661275c5761275781600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b61277f565b816001600160a01b0316836001600160a01b03161461277f5761277f8382612902565b6001600160a01b03821661279657610b528161299f565b826001600160a01b0316826001600160a01b031614610b5257610b528282612a4e565b60006001600160a01b0384163b156128bb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127fd903390899088908890600401613053565b602060405180830381600087803b15801561281757600080fd5b505af1925050508015612847575060408051601f3d908101601f1916820190925261284491810190612e85565b60015b6128a1573d808015612875576040519150601f19603f3d011682016040523d82523d6000602084013e61287a565b606091505b5080516128995760405162461bcd60e51b81526004016102fc906130a3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610bab565b506001610bab565b6128cd8383612a92565b6128da60008484846127b9565b610b525760405162461bcd60e51b81526004016102fc906130a3565b600061221582846131ea565b6000600161290f84611a6f565b6129199190613235565b60008381526008602052604090205490915080821461296c576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906129b190600190613235565b6000838152600a6020526040812054600980549394509092849081106129d9576129d9613369565b9060005260206000200154905080600983815481106129fa576129fa613369565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480612a3257612a32613353565b6001900381819060005260206000200160009055905550505050565b6000612a5983611a6f565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b038216612ae85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016102fc565b612af18161217e565b15612b3e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016102fc565b612b4a60008383612701565b6001600160a01b0382166000908152600460205260408120805460019290612b739084906131ea565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612bdd9061329b565b90600052602060002090601f016020900481019282612bff5760008555612c45565b82601f10612c1857805160ff1916838001178555612c45565b82800160010185558215612c45579182015b82811115612c45578251825591602001919060010190612c2a565b50612c51929150612c55565b5090565b5b80821115612c515760008155600101612c56565b600067ffffffffffffffff80841115612c8557612c8561337f565b604051601f8501601f19908116603f01168101908282118183101715612cad57612cad61337f565b81604052809350858152868686011115612cc657600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612cf757600080fd5b919050565b600060208284031215612d0e57600080fd5b61221582612ce0565b60008060408385031215612d2a57600080fd5b612d3383612ce0565b9150612d4160208401612ce0565b90509250929050565b600080600060608486031215612d5f57600080fd5b612d6884612ce0565b9250612d7660208501612ce0565b9150604084013590509250925092565b60008060008060808587031215612d9c57600080fd5b612da585612ce0565b9350612db360208601612ce0565b925060408501359150606085013567ffffffffffffffff811115612dd657600080fd5b8501601f81018713612de757600080fd5b612df687823560208401612c6a565b91505092959194509250565b60008060408385031215612e1557600080fd5b612e1e83612ce0565b915060208301358015158114612e3357600080fd5b809150509250929050565b60008060408385031215612e5157600080fd5b612e5a83612ce0565b946020939093013593505050565b600060208284031215612e7a57600080fd5b813561221581613395565b600060208284031215612e9757600080fd5b815161221581613395565b600060208284031215612eb457600080fd5b813567ffffffffffffffff811115612ecb57600080fd5b8201601f81018413612edc57600080fd5b610bab84823560208401612c6a565b600060208284031215612efd57600080fd5b815161ffff8116811461221557600080fd5b600060208284031215612f2157600080fd5b5035919050565b600060208284031215612f3a57600080fd5b5051919050565b600060208284031215612f5357600080fd5b813560ff8116811461221557600080fd5b60008151808452612f7c81602086016020860161326f565b601f01601f19169290920160200192915050565b60008151612fa281856020860161326f565b9290920192915050565b600080845481600182811c915080831680612fc857607f831692505b6020808410821415612fe857634e487b7160e01b86526022600452602486fd5b818015612ffc576001811461300d5761303a565b60ff1986168952848901965061303a565b60008b81526020902060005b868110156130325781548b820152908501908301613019565b505084890196505b50505050505061304a8185612f90565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061308690830184612f64565b9695505050505050565b6020815260006122156020830184612f64565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526029908201527f537761703a2043616e206e6f742062652063616c6c6564207573696e6720612060408201526831b7b73a3930b1ba1760b91b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600061ffff8083168185168083038211156131e1576131e1613327565b01949350505050565b600082198211156131fd576131fd613327565b500190565b6000826132115761321161333d565b500490565b600081600019048311821515161561323057613230613327565b500290565b60008282101561324757613247613327565b500390565b600060ff821660ff84168082101561326657613266613327565b90039392505050565b60005b8381101561328a578181015183820152602001613272565b838111156114625750506000910152565b600181811c908216806132af57607f821691505b602082108114156132d057634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156132ee576132ee613327565b6001019392505050565b600060001982141561330c5761330c613327565b5060010190565b6000826133225761332261333d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114611d2c57600080fdfea2646970667358221220ed86d5eaf6f80f478d64d405ca61014c8cb29a4bf57195cb566af2f29564797b64736f6c63430008060033697066733a2f2f626166796265696865636635616c6965756f6f6a6d676873767464796d78756c366a626a36656561676e616577696a34636a6b6a6574636b61346d2f
Deployed Bytecode
0x6080604052600436106102cd5760003560e01c806363d9df851161017557806395d89b41116100dc578063bf3953f311610095578063d6dacb441161006f578063d6dacb4414610852578063e0df5b6f14610873578063e985e9c514610893578063f2fde38b146108dc57600080fd5b8063bf3953f3146107fd578063c87b56dd1461081d578063d0e272d01461083d57600080fd5b806395d89b411461075d5780639a40b1ea14610772578063a22cb46514610788578063a9bbd114146107a8578063af447380146107c8578063b88d4fde146107dd57600080fd5b806370a082311161012e57806370a08231146106bf578063715018a6146106df57806375cfbb82146106f457806384dfc9751461070a5780638da5cb5b1461072a57806390d8434d1461074857600080fd5b806363d9df851461062d5780636831e0d81461064d5780636ba14d56146106635780636c0360eb146106785780636e1bd3231461068d578063705fe4be146106a357600080fd5b806323b872dd116102345780633ccfd60b116101ed5780634f558e79116101c75780634f558e79146105b85780634f6ccce7146105d85780635471f49f146105f85780636352211e1461060d57600080fd5b80633ccfd60b1461056357806342842e0e146105785780634cadae1b1461059857600080fd5b806323b872dd146104c85780632793b707146104e857806329c68dc1146104fb5780632f745c5914610510578063317f406c14610530578063379607f51461055057600080fd5b80630ebe7d11116102865780630ebe7d11146103f15780631382e2201461041a578063150b7a021461043a57806318160ddd1461047357806318270a0f146104925780632275aea9146104b357600080fd5b806301ffc9a71461030c57806302fb0c5e1461034157806306fdde0314610362578063081812fc14610384578063095ea7b3146103bc5780630bf46dcd146103dc57600080fd5b3661030757600b546001600160a01b031633146103055760405162461bcd60e51b81526004016102fc9061313e565b60405180910390fd5b005b600080fd5b34801561031857600080fd5b5061032c610327366004612e68565b6108fc565b60405190151581526020015b60405180910390f35b34801561034d57600080fd5b5060105461032c90600160a01b900460ff1681565b34801561036e57600080fd5b50610377610927565b6040516103389190613090565b34801561039057600080fd5b506103a461039f366004612f0f565b6109b9565b6040516001600160a01b039091168152602001610338565b3480156103c857600080fd5b506103056103d7366004612e3e565b610a41565b3480156103e857600080fd5b50610305610b57565b3480156103fd57600080fd5b506104076104aa81565b60405161ffff9091168152602001610338565b34801561042657600080fd5b506011546103a4906001600160a01b031681565b34801561044657600080fd5b5061045a610455366004612d86565b610ba2565b6040516001600160e01b03199091168152602001610338565b34801561047f57600080fd5b506009545b604051908152602001610338565b34801561049e57600080fd5b5060105461032c90600160a81b900460ff1681565b3480156104bf57600080fd5b50610305610bb3565b3480156104d457600080fd5b506103056104e3366004612d4a565b610d23565b6103056104f6366004612f0f565b610d54565b34801561050757600080fd5b50610305610f1a565b34801561051c57600080fd5b5061048461052b366004612e3e565b610f65565b34801561053c57600080fd5b5061030561054b366004612f0f565b610ffb565b61030561055e366004612f0f565b61102a565b34801561056f57600080fd5b5061030561133f565b34801561058457600080fd5b50610305610593366004612d4a565b611468565b3480156105a457600080fd5b506103056105b3366004612f41565b611483565b3480156105c457600080fd5b5061032c6105d3366004612f0f565b611824565b3480156105e457600080fd5b506104846105f3366004612f0f565b61182f565b34801561060457600080fd5b50610407600a81565b34801561061957600080fd5b506103a4610628366004612f0f565b6118c2565b34801561063957600080fd5b506010546103a4906001600160a01b031681565b34801561065957600080fd5b50610484600c5481565b34801561066f57600080fd5b50610305611939565b34801561068457600080fd5b506103776119e1565b34801561069957600080fd5b50610407611ccf81565b3480156106af57600080fd5b5061048467016345785d8a000081565b3480156106cb57600080fd5b506104846106da366004612cfc565b611a6f565b3480156106eb57600080fd5b50610305611af6565b34801561070057600080fd5b50610407611d4c81565b34801561071657600080fd5b50610305610725366004612e3e565b611b2c565b34801561073657600080fd5b50600b546001600160a01b03166103a4565b34801561075457600080fd5b50610305611cc4565b34801561076957600080fd5b50610377611d2f565b34801561077e57600080fd5b50610407611d3381565b34801561079457600080fd5b506103056107a3366004612e02565b611d3e565b3480156107b457600080fd5b506103056107c3366004612cfc565b611dfc565b3480156107d457600080fd5b50610305611e48565b3480156107e957600080fd5b506103056107f8366004612d86565b611eb0565b34801561080957600080fd5b50610305610818366004612cfc565b611ee2565b34801561082957600080fd5b50610377610838366004612f0f565b611f2e565b34801561084957600080fd5b5061032c611fcf565b34801561085e57600080fd5b50600b5461032c90600160a01b900460ff1681565b34801561087f57600080fd5b5061030561088e366004612ea2565b612055565b34801561089f57600080fd5b5061032c6108ae366004612d17565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108e857600080fd5b506103056108f7366004612cfc565b612096565b60006001600160e01b0319821663780e9d6360e01b148061092157506109218261212e565b92915050565b6060600180546109369061329b565b80601f01602080910402602001604051908101604052809291908181526020018280546109629061329b565b80156109af5780601f10610984576101008083540402835291602001916109af565b820191906000526020600020905b81548152906001019060200180831161099257829003601f168201915b5050505050905090565b60006109c48261217e565b610a255760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016102fc565b506000908152600560205260409020546001600160a01b031690565b6000610a4c826118c2565b9050806001600160a01b0316836001600160a01b03161415610aba5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016102fc565b336001600160a01b0382161480610ad65750610ad681336108ae565b610b485760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016102fc565b610b52838361219b565b505050565b600b546001600160a01b03163314610b815760405162461bcd60e51b81526004016102fc9061313e565b600b805460ff60a01b198116600160a01b9182900460ff1615909102179055565b630a85bd0160e11b5b949350505050565b600b546001600160a01b03163314610bdd5760405162461bcd60e51b81526004016102fc9061313e565b323314610c3e5760405162461bcd60e51b815260206004820152602960248201527f447261773a2043616e206e6f742062652063616c6c6564207573696e6720612060448201526831b7b73a3930b1ba1760b91b60648201526084016102fc565b601054600160a81b900460ff1615610c985760405162461bcd60e51b815260206004820152601f60248201527f447261773a2043616e206f6e6c79206472617720726166666c65206f6e63650060448201526064016102fc565b6040805142602082015244918101919091526bffffffffffffffffffffffff1941606090811b82168184015233811b8216607484015261025560f11b608884015230901b16608a820152610d0b906104aa90609e0160408051601f19818403018152919052805160209091012090612209565b6012556010805460ff60a81b1916600160a81b179055565b610d2d338261221c565b610d495760405162461bcd60e51b81526004016102fc90613173565b610b52838383612302565b323314610d735760405162461bcd60e51b81526004016102fc906130f5565b600b54600160a01b900460ff16610dcc5760405162461bcd60e51b815260206004820152601c60248201527f537761703a2046656174757265206973206e6f74206163746976652e0000000060448201526064016102fc565b33610dd6826118c2565b6001600160a01b031614610e385760405162461bcd60e51b8152602060048201526024808201527f537761703a204f6e6c79206f776e65722063616e20737761702074686520746f60448201526335b2b71760e11b60648201526084016102fc565b600c54341015610e995760405162461bcd60e51b815260206004820152602660248201527f537761703a20496e73756666696369656e742066756e647320666f7220737761604482015265383834b7339760d11b60648201526084016102fc565b6000610ea4826118c2565b9050610ec1813084604051806020016040528060008152506124ad565b610ecf600d80546001019055565b81816001600160a01b03167f466fe93b786bec51d5456ba8e9f736b265ed36ff65471dcb8a768cd9806300c5610f04600d5490565b6040519081526020015b60405180910390a35050565b600b546001600160a01b03163314610f445760405162461bcd60e51b81526004016102fc9061313e565b6010805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000610f7083611a6f565b8210610fd25760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016102fc565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b600b546001600160a01b031633146110255760405162461bcd60e51b81526004016102fc9061313e565b600c55565b6002600054141561107d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102fc565b6002600055601054600160a01b900460ff166110db5760405162461bcd60e51b815260206004820181905260248201527f436c61696d546f6b656e3a20576520617265206e6f7420796574206f70656e2e60448201526064016102fc565b3233146111425760405162461bcd60e51b815260206004820152602f60248201527f436c61696d546f6b656e3a2043616e206e6f742062652063616c6c656420757360448201526e34b73390309031b7b73a3930b1ba1760891b60648201526084016102fc565b61115467016345785d8a0000826124e0565b3410156111af5760405162461bcd60e51b8152602060048201526024808201527f436c61696d546f6b656e3a204e6f7420656e6f7567682045544820746f20636c60448201526330b4b69760e11b60648201526084016102fc565b6000811161120d5760405162461bcd60e51b815260206004820152602560248201527f436c61696d546f6b656e3a204e65656420746f20636c61696d206174206c656160448201526439ba10189760d91b60648201526084016102fc565b600a81111561126c5760405162461bcd60e51b815260206004820152602560248201527f436c61696d546f6b656e3a20596f752063616e20636c61696d206174206d6f736044820152643a1018981760d91b60648201526084016102fc565b600e54611ccf9061128290839061ffff166131ea565b106112db5760405162461bcd60e51b815260206004820152602360248201527f436c61696d546f6b656e3a20416c6c20746f6b656e732061726520636c61696d60448201526232b21760e91b60648201526084016102fc565b60005b818161ffff16101561133657600e546112fc90339061ffff166124ec565b600e5461130e9061ffff1660016131c4565b600e805461ffff191661ffff929092169190911790558061132e816132d6565b9150506112de565b50506001600055565b600b546001600160a01b031633146113695760405162461bcd60e51b81526004016102fc9061313e565b60006113836103e861137d476102266124e0565b90612506565b905060006113996103e861137d4761015e6124e0565b905060006113b1826113ab4786612209565b90612209565b6013546040519192506001600160a01b03169084156108fc029085906000818181858888f193505050501580156113ec573d6000803e3d6000fd5b506014546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015611427573d6000803e3d6000fd5b506015546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611462573d6000803e3d6000fd5b50505050565b610b5283838360405180602001604052806000815250611eb0565b600260005414156114d65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102fc565b6002600055601054600160a01b900460ff1661153e5760405162461bcd60e51b815260206004820152602160248201527f436c61696d526166666c653a20576520617265206e6f7420796574206f70656e6044820152601760f91b60648201526084016102fc565b3233146115a65760405162461bcd60e51b815260206004820152603060248201527f436c61696d526166666c653a2043616e206e6f742062652063616c6c6564207560448201526f39b4b73390309031b7b73a3930b1ba1760811b60648201526084016102fc565b601054600160a81b900460ff1661160f5760405162461bcd60e51b815260206004820152602760248201527f436c61696d526166666c653a20526166666c6520686173206e6f74206265656e60448201526610323930bbb71760c91b60648201526084016102fc565b6010546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561165357600080fd5b505afa158015611667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168b9190612f28565b905060008160ff16116116ec5760405162461bcd60e51b8152602060048201526024808201527f436c61696d526166666c653a204e656564207072652d6d696e7420746f20636c60448201526330b4b69760e11b60648201526084016102fc565b8060ff168260ff16106116ff5780611701565b815b91505b60ff82161561133657601054604051632f745c5960e01b8152336004820152600060248201819052916001600160a01b031690632f745c599060440160206040518083038186803b15801561175857600080fd5b505afa15801561176c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117909190612f28565b9050600061179d82612512565b90506117ad338261ffff166124ec565b601054604051630c67836160e21b815261ffff841660048201526001600160a01b039091169063319e0d8490602401600060405180830381600087803b1580156117f657600080fd5b505af115801561180a573d6000803e3d6000fd5b5050505060018461181b919061324c565b93505050611704565b60006109218261217e565b600061183a60095490565b821061189d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016102fc565b600982815481106118b0576118b0613369565b90600052602060002001549050919050565b6000818152600360205260408120546001600160a01b0316806109215760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016102fc565b600b546001600160a01b031633146119635760405162461bcd60e51b81526004016102fc9061313e565b601054600160a01b900460ff16156119b05760405162461bcd60e51b815260206004820152601060248201526f43616e206e6f7420776974686472617760801b60448201526064016102fc565b60405147903390819083156108fc029084906000818181858888f19350505050158015610b52573d6000803e3d6000fd5b600f80546119ee9061329b565b80601f0160208091040260200160405190810160405280929190818152602001828054611a1a9061329b565b8015611a675780601f10611a3c57610100808354040283529160200191611a67565b820191906000526020600020905b815481529060010190602001808311611a4a57829003601f168201915b505050505081565b60006001600160a01b038216611ada5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016102fc565b506001600160a01b031660009081526004602052604090205490565b600b546001600160a01b03163314611b205760405162461bcd60e51b81526004016102fc9061313e565b611b2a60006125b1565b565b600b546001600160a01b03163314611b565760405162461bcd60e51b81526004016102fc9061313e565b323314611b755760405162461bcd60e51b81526004016102fc906130f5565b600b54600160a01b900460ff16611bce5760405162461bcd60e51b815260206004820152601c60248201527f537761703a2046656174757265206973206e6f74206163746976652e0000000060448201526064016102fc565b611bd78161217e565b1580611bf3575030611be8826118c2565b6001600160a01b0316145b611c4a5760405162461bcd60e51b815260206004820152602260248201527f537761703a205468697320746f6b656e206973206e6f7420737761707061626c604482015261329760f11b60648201526084016102fc565b611c538161217e565b611c6657611c6182826124ec565b611c81565b611c81308383604051806020016040528060008152506124ad565b611c8f600d80546001019055565b80826001600160a01b03167fde7642f738fd739dbffaec304ed06de0189979c99f546d149ce2f54935859d70610f04600d5490565b600b546001600160a01b03163314611cee5760405162461bcd60e51b81526004016102fc9061313e565b611ccf5b611d3361ffff82161015611d2c57601354611d1a906001600160a01b031661ffff83166124ec565b80611d24816132d6565b915050611cf2565b50565b6060600280546109369061329b565b6001600160a01b038216331415611d975760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016102fc565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101610f0e565b600b546001600160a01b03163314611e265760405162461bcd60e51b81526004016102fc9061313e565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b600b546001600160a01b03163314611e725760405162461bcd60e51b81526004016102fc9061313e565b611d335b611d4c61ffff82161015611d2c57601454611e9e906001600160a01b031661ffff83166124ec565b80611ea8816132d6565b915050611e76565b611eba338361221c565b611ed65760405162461bcd60e51b81526004016102fc90613173565b611462848484846124ad565b600b546001600160a01b03163314611f0c5760405162461bcd60e51b81526004016102fc9061313e565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6060611f398261217e565b611f9d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016102fc565b600f611fa883612603565b604051602001611fb9929190612fac565b6040516020818303038152906040529050919050565b6010546040516370a0823160e01b815233600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b15801561201757600080fd5b505afa15801561202b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204f9190612f28565b11905090565b600b546001600160a01b0316331461207f5760405162461bcd60e51b81526004016102fc9061313e565b805161209290600f906020840190612bd1565b5050565b600b546001600160a01b031633146120c05760405162461bcd60e51b81526004016102fc9061313e565b6001600160a01b0381166121255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102fc565b611d2c816125b1565b60006001600160e01b031982166380ac58cd60e01b148061215f57506001600160e01b03198216635b5e139f60e01b145b8061092157506301ffc9a760e01b6001600160e01b0319831614610921565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121d0826118c2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006122158284613235565b9392505050565b60006122278261217e565b6122885760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016102fc565b6000612293836118c2565b9050806001600160a01b0316846001600160a01b031614806122ce5750836001600160a01b03166122c3846109b9565b6001600160a01b0316145b80610bab57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff16610bab565b826001600160a01b0316612315826118c2565b6001600160a01b03161461237d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016102fc565b6001600160a01b0382166123df5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016102fc565b6123ea838383612701565b6123f560008261219b565b6001600160a01b038316600090815260046020526040812080546001929061241e908490613235565b90915550506001600160a01b038216600090815260046020526040812080546001929061244c9084906131ea565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6124b8848484612302565b6124c4848484846127b9565b6114625760405162461bcd60e51b81526004016102fc906130a3565b60006122158284613216565b6120928282604051806020016040528060008152506128c3565b60006122158284613202565b60105460405163669f965960e11b815261ffff831660048201526000916104aa916125a7916001600160a01b03169063cd3f2cb29060240160206040518083038186803b15801561256257600080fd5b505afa158015612576573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061259a9190612eeb565b6012549061ffff166128f6565b6109219190613313565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060816126275750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612651578061263b816132f8565b915061264a9050600a83613202565b915061262b565b60008167ffffffffffffffff81111561266c5761266c61337f565b6040519080825280601f01601f191660200182016040528015612696576020820181803683370190505b5090505b8415610bab576126ab600183613235565b91506126b8600a86613313565b6126c39060306131ea565b60f81b8183815181106126d8576126d8613369565b60200101906001600160f81b031916908160001a9053506126fa600a86613202565b945061269a565b6001600160a01b03831661275c5761275781600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b61277f565b816001600160a01b0316836001600160a01b03161461277f5761277f8382612902565b6001600160a01b03821661279657610b528161299f565b826001600160a01b0316826001600160a01b031614610b5257610b528282612a4e565b60006001600160a01b0384163b156128bb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127fd903390899088908890600401613053565b602060405180830381600087803b15801561281757600080fd5b505af1925050508015612847575060408051601f3d908101601f1916820190925261284491810190612e85565b60015b6128a1573d808015612875576040519150601f19603f3d011682016040523d82523d6000602084013e61287a565b606091505b5080516128995760405162461bcd60e51b81526004016102fc906130a3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610bab565b506001610bab565b6128cd8383612a92565b6128da60008484846127b9565b610b525760405162461bcd60e51b81526004016102fc906130a3565b600061221582846131ea565b6000600161290f84611a6f565b6129199190613235565b60008381526008602052604090205490915080821461296c576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906129b190600190613235565b6000838152600a6020526040812054600980549394509092849081106129d9576129d9613369565b9060005260206000200154905080600983815481106129fa576129fa613369565b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480612a3257612a32613353565b6001900381819060005260206000200160009055905550505050565b6000612a5983611a6f565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b038216612ae85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016102fc565b612af18161217e565b15612b3e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016102fc565b612b4a60008383612701565b6001600160a01b0382166000908152600460205260408120805460019290612b739084906131ea565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612bdd9061329b565b90600052602060002090601f016020900481019282612bff5760008555612c45565b82601f10612c1857805160ff1916838001178555612c45565b82800160010185558215612c45579182015b82811115612c45578251825591602001919060010190612c2a565b50612c51929150612c55565b5090565b5b80821115612c515760008155600101612c56565b600067ffffffffffffffff80841115612c8557612c8561337f565b604051601f8501601f19908116603f01168101908282118183101715612cad57612cad61337f565b81604052809350858152868686011115612cc657600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612cf757600080fd5b919050565b600060208284031215612d0e57600080fd5b61221582612ce0565b60008060408385031215612d2a57600080fd5b612d3383612ce0565b9150612d4160208401612ce0565b90509250929050565b600080600060608486031215612d5f57600080fd5b612d6884612ce0565b9250612d7660208501612ce0565b9150604084013590509250925092565b60008060008060808587031215612d9c57600080fd5b612da585612ce0565b9350612db360208601612ce0565b925060408501359150606085013567ffffffffffffffff811115612dd657600080fd5b8501601f81018713612de757600080fd5b612df687823560208401612c6a565b91505092959194509250565b60008060408385031215612e1557600080fd5b612e1e83612ce0565b915060208301358015158114612e3357600080fd5b809150509250929050565b60008060408385031215612e5157600080fd5b612e5a83612ce0565b946020939093013593505050565b600060208284031215612e7a57600080fd5b813561221581613395565b600060208284031215612e9757600080fd5b815161221581613395565b600060208284031215612eb457600080fd5b813567ffffffffffffffff811115612ecb57600080fd5b8201601f81018413612edc57600080fd5b610bab84823560208401612c6a565b600060208284031215612efd57600080fd5b815161ffff8116811461221557600080fd5b600060208284031215612f2157600080fd5b5035919050565b600060208284031215612f3a57600080fd5b5051919050565b600060208284031215612f5357600080fd5b813560ff8116811461221557600080fd5b60008151808452612f7c81602086016020860161326f565b601f01601f19169290920160200192915050565b60008151612fa281856020860161326f565b9290920192915050565b600080845481600182811c915080831680612fc857607f831692505b6020808410821415612fe857634e487b7160e01b86526022600452602486fd5b818015612ffc576001811461300d5761303a565b60ff1986168952848901965061303a565b60008b81526020902060005b868110156130325781548b820152908501908301613019565b505084890196505b50505050505061304a8185612f90565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061308690830184612f64565b9695505050505050565b6020815260006122156020830184612f64565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526029908201527f537761703a2043616e206e6f742062652063616c6c6564207573696e6720612060408201526831b7b73a3930b1ba1760b91b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600061ffff8083168185168083038211156131e1576131e1613327565b01949350505050565b600082198211156131fd576131fd613327565b500190565b6000826132115761321161333d565b500490565b600081600019048311821515161561323057613230613327565b500290565b60008282101561324757613247613327565b500390565b600060ff821660ff84168082101561326657613266613327565b90039392505050565b60005b8381101561328a578181015183820152602001613272565b838111156114625750506000910152565b600181811c908216806132af57607f821691505b602082108114156132d057634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156132ee576132ee613327565b6001019392505050565b600060001982141561330c5761330c613327565b5060010190565b6000826133225761332261333d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114611d2c57600080fdfea2646970667358221220ed86d5eaf6f80f478d64d405ca61014c8cb29a4bf57195cb566af2f29564797b64736f6c63430008060033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.