Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
0 Hoot
Holders
422
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 HootLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Hoot
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /* ,' ``', ' (o)(o) ` > ; ', . ...-'"""""`'. .'`',`''''`________: ": (`'. '.; | ;/\;\; (`',.',.; | | (,'` .`.,' | Birds | (,.',.',' | 100% | (,.',.-`_____| Onchain | __\_ _\_ | hoot hoot! | |_______________| */ // we hope you Digg it! error SoundBounded(); contract Hoot is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using Address for address; mapping(uint256 => string[]) public hootMetaData; mapping(uint256 => bool) public beenClaimed; mapping(uint256 => bool) public isSoul; bool public openGates; ERC721 public constant MB = ERC721(0x23581767a106ae21c074b2276D25e5C3e136a68b); bytes32 public constant METADATAROOT = 0x5d2bb5f5ec347e04ba7e4f2f121f74eb22bfe097dc040b843913f4c7d2add985; uint256 public launchTime; constructor() ERC721("Hoot", "Hoot") { launchTime = block.timestamp; } function setHootMetaData(uint256 tokenId, string[] memory traits) private { require(hootMetaData[tokenId].length == 0, "Hoot already set"); require(block.timestamp < launchTime + 1 weeks, "Saved forever"); hootMetaData[tokenId] = traits; } function claim( uint256 id, string[] memory traits, bytes32[] calldata proof ) external nonReentrant { require(openGates, "Hoot gates are closed"); require(beenClaimed[id] == false, "Already minted"); require(balanceOf(msg.sender) < 2, "Max two hoots"); require(id >= 0 && id <= 9999, "Exceeds max supply"); bytes memory traitsPacked; for (uint256 i = 0; i < traits.length; i++) { traitsPacked = abi.encodePacked(traitsPacked, traits[i]); } bytes32 leaf = keccak256(abi.encodePacked(id, traitsPacked)); require(MerkleProof.verify(proof, METADATAROOT, leaf), "Invalid proof"); beenClaimed[id] = true; setHootMetaData(id, traits); _safeMint(msg.sender, id); } function boundSoul(uint256 id) external { require(block.timestamp > launchTime + 1 weeks, "Cant lock yet"); require(MB.ownerOf(id) == msg.sender, "Must own MB"); require(ownerOf(id) == msg.sender, "Must own Hoot"); isSoul[id] = true; } function openTheGates() external onlyOwner { require(openGates == false, "Gates already open"); openGates = true; } function hasBeenClaimed(uint256 tokenId) external view returns (bool) { return beenClaimed[tokenId]; } function transferFrom( address from, address to, uint256 tokenId ) public override { if (isSoul[tokenId]) { revert SoundBounded(); } ERC721.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { if (isSoul[tokenId]) { revert SoundBounded(); } ERC721.safeTransferFrom(from, to, tokenId, _data); } function ownerOf(uint256 tokenId_) public view override returns (address) { if (isSoul[tokenId_]) { return MB.ownerOf(tokenId_); } return super.ownerOf(tokenId_); } function tokenURI(uint256 tokenId) public view override returns (string memory) { string[] memory traits = hootMetaData[tokenId]; uint256 length = 20 + 4 * (traits.length - 3); string[] memory parts = new string[](length); parts[0] = '<svg xmlns="http://www.w3.org/2000/svg" '; parts[1] = 'preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350">'; parts[ 2 ] = "<style>.base { fill: white; font-family: serif; font-size: "; parts[3] = '14px; }</style> <rect width="100%" height="100%" '; parts[4] = 'fill="black" /><text x="10" y="20" class="base">#'; parts[5] = toString(tokenId); parts[6] = "</text>"; parts[7] = '<text x="10" y="40" '; parts[8] = 'class="base">'; parts[9] = traits[0]; parts[10] = "</text>"; parts[11] = '<text x="10" y="60" '; parts[12] = 'class="base">'; parts[13] = traits[1]; parts[14] = "</text>"; parts[15] = '<text x="10" y="80" '; parts[16] = 'class="base">'; parts[17] = traits[2]; parts[18] = "</text>"; if (length >= 24) { parts[19] = '<text x="10" y="100" '; parts[20] = 'class="base">'; parts[21] = traits[3]; parts[22] = "</text>"; } if (length >= 28) { parts[23] = '<text x="10" y="120" '; parts[24] = 'class="base">'; parts[25] = traits[4]; parts[26] = "</text>"; } if (length >= 32) { parts[27] = '<text x="10" y="140" '; parts[28] = 'class="base">'; parts[29] = traits[5]; parts[30] = "</text>"; } if (length >= 36) { parts[31] = '<text x="10" y="160" '; parts[32] = 'class="base">'; parts[33] = traits[6]; parts[34] = "</text>"; } if (length >= 40) { parts[35] = '<text x="10" y="180" '; parts[36] = 'class="base">'; parts[37] = traits[7]; parts[38] = "</text>"; } parts[parts.length - 1] = "</svg>"; string memory output; for (uint256 i = 0; i < parts.length; i++) { output = string(abi.encodePacked(output, parts[i])); } string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name": "Hoot #', toString(tokenId), '", "description": "Hoot is an on-chain collection inspired by Loot. Each tokens attributes correspond to the Moonbird of the same ID. CC0.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}' ) ) ) ); output = string( abi.encodePacked("data:application/json;base64,", json) ); return output; } function toString(uint256 value) internal pure returns (string memory) { 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); } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF) ) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "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"},{"inputs":[],"name":"SoundBounded","type":"error"},{"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":"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":"MB","outputs":[{"internalType":"contract ERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METADATAROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"beenClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"boundSoul","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string[]","name":"traits","type":"string[]"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"hasBeenClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"hootMetaData","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isSoul","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openGates","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTheGates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252600480825263121bdbdd60e21b6020808401828152855180870190965292855284015281519192916200005191600091620000e9565b50805162000067906001906020840190620000e9565b505050620000846200007e6200009360201b60201c565b62000097565b600160075542600c55620001cc565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000f7906200018f565b90600052602060002090601f0160209004810192826200011b576000855562000166565b82601f106200013657805160ff191683800117855562000166565b8280016001018555821562000166579182015b828111156200016657825182559160200191906001019062000149565b506200017492915062000178565b5090565b5b8082111562000174576000815560010162000179565b600181811c90821680620001a457607f821691505b60208210811415620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b61342180620001dc6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c806378d7e197116100f9578063ab4ef89511610097578063cbce290011610071578063cbce2900146103a7578063e985e9c5146103ba578063f2fde38b146103f6578063f4df747c1461040957600080fd5b8063ab4ef89514610366578063b88d4fde14610381578063c87b56dd1461039457600080fd5b80638c9f8688116100d35780638c9f8688146103275780638da5cb5b1461033a57806395d89b411461034b578063a22cb4651461035357600080fd5b806378d7e19714610303578063790ca413146103165780637bbdad111461031f57600080fd5b806323b872dd1161016657806369642ed41161014057806369642ed4146102aa57806370a08231146102b7578063715018a6146102d8578063745fdbb8146102e057600080fd5b806323b872dd1461027157806342842e0e146102845780636352211e1461029757600080fd5b806301ffc9a7146101ae57806306fdde03146101d6578063081812fc146101eb578063095ea7b3146102165780630d1f67761461022b57806314833a9e1461024e575b600080fd5b6101c16101bc366004612cc7565b610430565b60405190151581526020015b60405180910390f35b6101de610482565b6040516101cd9190613063565b6101fe6101f9366004612cff565b610514565b6040516001600160a01b0390911681526020016101cd565b610229610224366004612c9c565b61053b565b005b6101c1610239366004612cff565b600a6020526000908152604090205460ff1681565b6101c161025c366004612cff565b60009081526009602052604090205460ff1690565b61022961027f366004612bae565b610656565b610229610292366004612bae565b610691565b6101fe6102a5366004612cff565b6106ac565b600b546101c19060ff1681565b6102ca6102c5366004612b3e565b61074f565b6040519081526020016101cd565b6102296107d5565b6101c16102ee366004612cff565b60096020526000908152604090205460ff1681565b6101de610311366004612e09565b6107e9565b6102ca600c5481565b6102296108a2565b610229610335366004612d17565b610901565b6006546001600160a01b03166101fe565b6101de610bf2565b610229610361366004612c6b565b610c01565b6101fe7323581767a106ae21c074b2276d25e5c3e136a68b81565b61022961038f366004612bee565b610c10565b6101de6103a2366004612cff565b610c52565b6102296103b5366004612cff565b611b50565b6101c16103c8366004612b76565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610229610404366004612b3e565b611cd2565b6102ca7f5d2bb5f5ec347e04ba7e4f2f121f74eb22bfe097dc040b843913f4c7d2add98581565b60006001600160e01b031982166380ac58cd60e01b148061046157506001600160e01b03198216635b5e139f60e01b145b8061047c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060008054610491906131d5565b80601f01602080910402602001604051908101604052809291908181526020018280546104bd906131d5565b801561050a5780601f106104df5761010080835404028352916020019161050a565b820191906000526020600020905b8154815290600101906020018083116104ed57829003601f168201915b5050505050905090565b600061051f82611d4b565b506000908152600460205260409020546001600160a01b031690565b600061054682611daa565b9050806001600160a01b0316836001600160a01b031614156105b95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806105d557506105d581336103c8565b6106475760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016105b0565b6106518383611e0a565b505050565b6000818152600a602052604090205460ff1615610686576040516330ce31cb60e21b815260040160405180910390fd5b610651838383611e78565b61065183838360405180602001604052806000815250610c10565b6000818152600a602052604081205460ff1615610746576040516331a9108f60e11b8152600481018390527323581767a106ae21c074b2276d25e5c3e136a68b90636352211e9060240160206040518083038186803b15801561070e57600080fd5b505afa158015610722573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047c9190612b5a565b61047c82611daa565b60006001600160a01b0382166107b95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105b0565b506001600160a01b031660009081526003602052604090205490565b6107dd611ea9565b6107e76000611f03565b565b6008602052816000526040600020818154811061080557600080fd5b90600052602060002001600091509150508054610821906131d5565b80601f016020809104026020016040519081016040528092919081815260200182805461084d906131d5565b801561089a5780601f1061086f5761010080835404028352916020019161089a565b820191906000526020600020905b81548152906001019060200180831161087d57829003601f168201915b505050505081565b6108aa611ea9565b600b5460ff16156108f25760405162461bcd60e51b815260206004820152601260248201527123b0ba32b99030b63932b0b23c9037b832b760711b60448201526064016105b0565b600b805460ff19166001179055565b600260075414156109545760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105b0565b6002600755600b5460ff166109a35760405162461bcd60e51b8152602060048201526015602482015274121bdbdd0819d85d195cc8185c994818db1bdcd959605a1b60448201526064016105b0565b60008481526009602052604090205460ff16156109f35760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b60448201526064016105b0565b60026109fe3361074f565b10610a3b5760405162461bcd60e51b815260206004820152600d60248201526c4d61782074776f20686f6f747360981b60448201526064016105b0565b61270f841115610a825760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b60448201526064016105b0565b606060005b8451811015610aee5781858281518110610ab157634e487b7160e01b600052603260045260246000fd5b6020026020010151604051602001610aca929190612e56565b60405160208183030381529060405291508080610ae690613210565b915050610a87565b5060008582604051602001610b04929190613000565b604051602081830303815290604052805190602001209050610b7c8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f5d2bb5f5ec347e04ba7e4f2f121f74eb22bfe097dc040b843913f4c7d2add9859250859150611f559050565b610bb85760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b60448201526064016105b0565b6000868152600960205260409020805460ff19166001179055610bdb8686611f6b565b610be53387612027565b5050600160075550505050565b606060018054610491906131d5565b610c0c338383612041565b5050565b6000828152600a602052604090205460ff1615610c40576040516330ce31cb60e21b815260040160405180910390fd5b610c4c84848484612110565b50505050565b6000818152600860209081526040808320805482518185028101850190935280835260609493849084015b82821015610d29578382906000526020600020018054610c9c906131d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc8906131d5565b8015610d155780601f10610cea57610100808354040283529160200191610d15565b820191906000526020600020905b815481529060010190602001808311610cf857829003601f168201915b505050505081526020019060010190610c7d565b505050509050600060038251610d3f9190613192565b610d4a906004613173565b610d55906014613147565b905060008167ffffffffffffffff811115610d8057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610db357816020015b6060815260200190600190039081610d9e5790505b5090506040518060600160405280602881526020016133c46028913981600081518110610df057634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603a8152602001613359603a913981600181518110610e3557634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603b81526020016132de603b913981600281518110610e7a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603181526020016132ad6031913981600381518110610ebf57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603181526020016133936031913981600481518110610f0457634e487b7160e01b600052603260045260246000fd5b6020026020010181905250610f1885612142565b81600581518110610f3957634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081600681518110610f8557634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280601481526020017301e3a32bc3a103c1e91189811103c9e911a1811160651b81525081600781518110610fde57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160088151811061103057634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260008151811061105c57634e487b7160e01b600052603260045260246000fd5b60200260200101518160098151811061108557634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081600a815181106110d157634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280601481526020017301e3a32bc3a103c1e91189811103c9e911b1811160651b81525081600b8151811061112a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b81525081600c8151811061117c57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826001815181106111a857634e487b7160e01b600052603260045260246000fd5b602002602001015181600d815181106111d157634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081600e8151811061121d57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280601481526020017301e3a32bc3a103c1e91189811103c9e911c1811160651b81525081600f8151811061127657634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b815250816010815181106112c857634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826002815181106112f457634e487b7160e01b600052603260045260246000fd5b60200260200101518160118151811061131d57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b8152508160128151811061136957634e487b7160e01b600052603260045260246000fd5b6020026020010181905250601882106114ca576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189818111605d1b815250816013815181106113cb57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160148151811061141d57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260038151811061144957634e487b7160e01b600052603260045260246000fd5b60200260200101518160158151811061147257634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b815250816016815181106114be57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b601c8210611620576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189918111605d1b8152508160178151811061152157634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160188151811061157357634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260048151811061159f57634e487b7160e01b600052603260045260246000fd5b6020026020010151816019815181106115c857634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081601a8151811061161457634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b60208210611776576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189a18111605d1b81525081601b8151811061167757634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b81525081601c815181106116c957634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826005815181106116f557634e487b7160e01b600052603260045260246000fd5b602002602001015181601d8151811061171e57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081601e8151811061176a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b602482106118cc576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189b18111605d1b81525081601f815181106117cd57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160208151811061181f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260068151811061184b57634e487b7160e01b600052603260045260246000fd5b60200260200101518160218151811061187457634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b815250816022815181106118c057634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b60288210611a22576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189c18111605d1b8152508160238151811061192357634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160248151811061197557634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826007815181106119a157634e487b7160e01b600052603260045260246000fd5b6020026020010151816025815181106119ca57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081602681518110611a1657634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b604051806040016040528060068152602001651e17b9bb339f60d11b8152508160018351611a509190613192565b81518110611a6e57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250606060005b8251811015611ae55781838281518110611aa857634e487b7160e01b600052603260045260246000fd5b6020026020010151604051602001611ac1929190612e56565b60405160208183030381529060405291508080611add90613210565b915050611a7e565b506000611b22611af488612142565b611afd84612264565b604051602001611b0e929190612e85565b604051602081830303815290604052612264565b905080604051602001611b359190612fbb565b60408051601f19818403018152919052979650505050505050565b600c54611b609062093a80613147565b4211611b9e5760405162461bcd60e51b815260206004820152600d60248201526c10d85b9d081b1bd8dac81e595d609a1b60448201526064016105b0565b6040516331a9108f60e11b81526004810182905233907323581767a106ae21c074b2276d25e5c3e136a68b90636352211e9060240160206040518083038186803b158015611beb57600080fd5b505afa158015611bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c239190612b5a565b6001600160a01b031614611c675760405162461bcd60e51b815260206004820152600b60248201526a26bab9ba1037bbb71026a160a91b60448201526064016105b0565b33611c71826106ac565b6001600160a01b031614611cb75760405162461bcd60e51b815260206004820152600d60248201526c135d5cdd081bdddb88121bdbdd609a1b60448201526064016105b0565b6000908152600a60205260409020805460ff19166001179055565b611cda611ea9565b6001600160a01b038116611d3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b0565b611d4881611f03565b50565b6000818152600260205260409020546001600160a01b0316611d485760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105b0565b6000818152600260205260408120546001600160a01b03168061047c5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105b0565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e3f82611daa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611e8233826123d8565b611e9e5760405162461bcd60e51b81526004016105b0906130c8565b610651838383612456565b6006546001600160a01b031633146107e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105b0565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082611f6285846125f2565b14949350505050565b60008281526008602052604090205415611fba5760405162461bcd60e51b815260206004820152601060248201526f121bdbdd08185b1c9958591e481cd95d60821b60448201526064016105b0565b600c54611fca9062093a80613147565b42106120085760405162461bcd60e51b815260206004820152600d60248201526c29b0bb32b2103337b932bb32b960991b60448201526064016105b0565b6000828152600860209081526040909120825161065192840190612934565b610c0c82826040518060200160405280600081525061264d565b816001600160a01b0316836001600160a01b031614156120a35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105b0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61211a33836123d8565b6121365760405162461bcd60e51b81526004016105b0906130c8565b610c4c84848484612680565b6060816121665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612190578061217a81613210565b91506121899050600a8361315f565b915061216a565b60008167ffffffffffffffff8111156121b957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156121e3576020820181803683370190505b5090505b841561225c576121f8600183613192565b9150612205600a8661322b565b612210906030613147565b60f81b81838151811061223357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612255600a8661315f565b94506121e7565b949350505050565b805160609080612284575050604080516020810190915260008152919050565b60006003612293836002613147565b61229d919061315f565b6122a8906004613173565b905060006122b7826020613147565b67ffffffffffffffff8111156122dd57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612307576020820181803683370190505b5090506000604051806060016040528060408152602001613319604091399050600181016020830160005b86811015612393576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612332565b5060038606600181146123ad57600281146123be576123ca565b613d3d60f01b6001198301526123ca565b603d60f81b6000198301525b505050918152949350505050565b6000806123e483611daa565b9050806001600160a01b0316846001600160a01b0316148061242b57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061225c5750836001600160a01b031661244484610514565b6001600160a01b031614949350505050565b826001600160a01b031661246982611daa565b6001600160a01b0316146124cd5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105b0565b6001600160a01b03821661252f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105b0565b61253a600082611e0a565b6001600160a01b0383166000908152600360205260408120805460019290612563908490613192565b90915550506001600160a01b0382166000908152600360205260408120805460019290612591908490613147565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b8451811015612645576126318286838151811061262457634e487b7160e01b600052603260045260246000fd5b60200260200101516126b3565b91508061263d81613210565b9150506125f7565b509392505050565b61265783836126e5565b6126646000848484612827565b6106515760405162461bcd60e51b81526004016105b090613076565b61268b848484612456565b61269784848484612827565b610c4c5760405162461bcd60e51b81526004016105b090613076565b60008183106126cf5760008281526020849052604090206126de565b60008381526020839052604090205b9392505050565b6001600160a01b03821661273b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105b0565b6000818152600260205260409020546001600160a01b0316156127a05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105b0565b6001600160a01b03821660009081526003602052604081208054600192906127c9908490613147565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561292957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061286b903390899088908890600401613026565b602060405180830381600087803b15801561288557600080fd5b505af19250505080156128b5575060408051601f3d908101601f191682019092526128b291810190612ce3565b60015b61290f573d8080156128e3576040519150601f19603f3d011682016040523d82523d6000602084013e6128e8565b606091505b5080516129075760405162461bcd60e51b81526004016105b090613076565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061225c565b506001949350505050565b828054828255906000526020600020908101928215612981579160200282015b828111156129815782518051612971918491602090910190612991565b5091602001919060010190612954565b5061298d929150612a11565b5090565b82805461299d906131d5565b90600052602060002090601f0160209004810192826129bf5760008555612a05565b82601f106129d857805160ff1916838001178555612a05565b82800160010185558215612a05579182015b82811115612a055782518255916020019190600101906129ea565b5061298d929150612a2e565b8082111561298d576000612a258282612a43565b50600101612a11565b5b8082111561298d5760008155600101612a2f565b508054612a4f906131d5565b6000825580601f10612a5f575050565b601f016020900490600052602060002090810190611d489190612a2e565b600067ffffffffffffffff831115612a9757612a9761326b565b612aaa601f8401601f1916602001613116565b9050828152838383011115612abe57600080fd5b828260208301376000602084830101529392505050565b60008083601f840112612ae6578182fd5b50813567ffffffffffffffff811115612afd578182fd5b6020830191508360208260051b8501011115612b1857600080fd5b9250929050565b600082601f830112612b2f578081fd5b6126de83833560208501612a7d565b600060208284031215612b4f578081fd5b81356126de81613281565b600060208284031215612b6b578081fd5b81516126de81613281565b60008060408385031215612b88578081fd5b8235612b9381613281565b91506020830135612ba381613281565b809150509250929050565b600080600060608486031215612bc2578081fd5b8335612bcd81613281565b92506020840135612bdd81613281565b929592945050506040919091013590565b60008060008060808587031215612c03578081fd5b8435612c0e81613281565b93506020850135612c1e81613281565b925060408501359150606085013567ffffffffffffffff811115612c40578182fd5b8501601f81018713612c50578182fd5b612c5f87823560208401612a7d565b91505092959194509250565b60008060408385031215612c7d578182fd5b8235612c8881613281565b915060208301358015158114612ba3578182fd5b60008060408385031215612cae578182fd5b8235612cb981613281565b946020939093013593505050565b600060208284031215612cd8578081fd5b81356126de81613296565b600060208284031215612cf4578081fd5b81516126de81613296565b600060208284031215612d10578081fd5b5035919050565b60008060008060608587031215612d2c578384fd5b8435935060208086013567ffffffffffffffff80821115612d4b578586fd5b818801915088601f830112612d5e578586fd5b813581811115612d7057612d7061326b565b8060051b612d7f858201613116565b8281528581019085870183870188018e1015612d99578a8bfd5b8a93505b84841015612dd657803586811115612db3578b8cfd5b612dc18f8a838b0101612b1f565b84525060019390930192918701918701612d9d565b5098505050506040880135925080831115612def578485fd5b5050612dfd87828801612ad5565b95989497509550505050565b60008060408385031215612e1b578182fd5b50508035926020909101359150565b60008151808452612e428160208601602086016131a9565b601f01601f19169290920160200192915050565b60008351612e688184602088016131a9565b835190830190612e7c8183602088016131a9565b01949350505050565b6f7b226e616d65223a2022486f6f74202360801b81528251600090612eb18160108501602088016131a9565b7f222c20226465736372697074696f6e223a2022486f6f7420697320616e206f6e6010918401918201527f2d636861696e20636f6c6c656374696f6e20696e737069726564206279204c6f60308201527f6f742e204561636820746f6b656e73206174747269627574657320636f72726560508201527f73706f6e6420746f20746865204d6f6f6e62697264206f66207468652073616d60708201527f652049442e204343302e222c2022696d616765223a2022646174613a696d6167609082015270194bdcdd99cade1b5b0ed8985cd94d8d0b607a1b60b08201528351612fa08160c18401602088016131a9565b61227d60f01b60c1929091019182015260c301949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612ff381601d8501602087016131a9565b91909101601d0192915050565b828152600082516130188160208501602087016131a9565b919091016020019392505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061305990830184612e2a565b9695505050505050565b6020815260006126de6020830184612e2a565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561313f5761313f61326b565b604052919050565b6000821982111561315a5761315a61323f565b500190565b60008261316e5761316e613255565b500490565b600081600019048311821515161561318d5761318d61323f565b500290565b6000828210156131a4576131a461323f565b500390565b60005b838110156131c45781810151838201526020016131ac565b83811115610c4c5750506000910152565b600181811c908216806131e957607f821691505b6020821081141561320a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156132245761322461323f565b5060010190565b60008261323a5761323a613255565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611d4857600080fd5b6001600160e01b031981168114611d4857600080fdfe313470783b207d3c2f7374796c653e203c726563742077696474683d223130302522206865696768743d223130302522203c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a204142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f7072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e66696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e233c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f7376672220a2646970667358221220b1c8a669ac7d59eade9aea68f83c83616b8bb905001605f1ccf93e255285d09564736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c806378d7e197116100f9578063ab4ef89511610097578063cbce290011610071578063cbce2900146103a7578063e985e9c5146103ba578063f2fde38b146103f6578063f4df747c1461040957600080fd5b8063ab4ef89514610366578063b88d4fde14610381578063c87b56dd1461039457600080fd5b80638c9f8688116100d35780638c9f8688146103275780638da5cb5b1461033a57806395d89b411461034b578063a22cb4651461035357600080fd5b806378d7e19714610303578063790ca413146103165780637bbdad111461031f57600080fd5b806323b872dd1161016657806369642ed41161014057806369642ed4146102aa57806370a08231146102b7578063715018a6146102d8578063745fdbb8146102e057600080fd5b806323b872dd1461027157806342842e0e146102845780636352211e1461029757600080fd5b806301ffc9a7146101ae57806306fdde03146101d6578063081812fc146101eb578063095ea7b3146102165780630d1f67761461022b57806314833a9e1461024e575b600080fd5b6101c16101bc366004612cc7565b610430565b60405190151581526020015b60405180910390f35b6101de610482565b6040516101cd9190613063565b6101fe6101f9366004612cff565b610514565b6040516001600160a01b0390911681526020016101cd565b610229610224366004612c9c565b61053b565b005b6101c1610239366004612cff565b600a6020526000908152604090205460ff1681565b6101c161025c366004612cff565b60009081526009602052604090205460ff1690565b61022961027f366004612bae565b610656565b610229610292366004612bae565b610691565b6101fe6102a5366004612cff565b6106ac565b600b546101c19060ff1681565b6102ca6102c5366004612b3e565b61074f565b6040519081526020016101cd565b6102296107d5565b6101c16102ee366004612cff565b60096020526000908152604090205460ff1681565b6101de610311366004612e09565b6107e9565b6102ca600c5481565b6102296108a2565b610229610335366004612d17565b610901565b6006546001600160a01b03166101fe565b6101de610bf2565b610229610361366004612c6b565b610c01565b6101fe7323581767a106ae21c074b2276d25e5c3e136a68b81565b61022961038f366004612bee565b610c10565b6101de6103a2366004612cff565b610c52565b6102296103b5366004612cff565b611b50565b6101c16103c8366004612b76565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610229610404366004612b3e565b611cd2565b6102ca7f5d2bb5f5ec347e04ba7e4f2f121f74eb22bfe097dc040b843913f4c7d2add98581565b60006001600160e01b031982166380ac58cd60e01b148061046157506001600160e01b03198216635b5e139f60e01b145b8061047c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060008054610491906131d5565b80601f01602080910402602001604051908101604052809291908181526020018280546104bd906131d5565b801561050a5780601f106104df5761010080835404028352916020019161050a565b820191906000526020600020905b8154815290600101906020018083116104ed57829003601f168201915b5050505050905090565b600061051f82611d4b565b506000908152600460205260409020546001600160a01b031690565b600061054682611daa565b9050806001600160a01b0316836001600160a01b031614156105b95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806105d557506105d581336103c8565b6106475760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016105b0565b6106518383611e0a565b505050565b6000818152600a602052604090205460ff1615610686576040516330ce31cb60e21b815260040160405180910390fd5b610651838383611e78565b61065183838360405180602001604052806000815250610c10565b6000818152600a602052604081205460ff1615610746576040516331a9108f60e11b8152600481018390527323581767a106ae21c074b2276d25e5c3e136a68b90636352211e9060240160206040518083038186803b15801561070e57600080fd5b505afa158015610722573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047c9190612b5a565b61047c82611daa565b60006001600160a01b0382166107b95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016105b0565b506001600160a01b031660009081526003602052604090205490565b6107dd611ea9565b6107e76000611f03565b565b6008602052816000526040600020818154811061080557600080fd5b90600052602060002001600091509150508054610821906131d5565b80601f016020809104026020016040519081016040528092919081815260200182805461084d906131d5565b801561089a5780601f1061086f5761010080835404028352916020019161089a565b820191906000526020600020905b81548152906001019060200180831161087d57829003601f168201915b505050505081565b6108aa611ea9565b600b5460ff16156108f25760405162461bcd60e51b815260206004820152601260248201527123b0ba32b99030b63932b0b23c9037b832b760711b60448201526064016105b0565b600b805460ff19166001179055565b600260075414156109545760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105b0565b6002600755600b5460ff166109a35760405162461bcd60e51b8152602060048201526015602482015274121bdbdd0819d85d195cc8185c994818db1bdcd959605a1b60448201526064016105b0565b60008481526009602052604090205460ff16156109f35760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b60448201526064016105b0565b60026109fe3361074f565b10610a3b5760405162461bcd60e51b815260206004820152600d60248201526c4d61782074776f20686f6f747360981b60448201526064016105b0565b61270f841115610a825760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b60448201526064016105b0565b606060005b8451811015610aee5781858281518110610ab157634e487b7160e01b600052603260045260246000fd5b6020026020010151604051602001610aca929190612e56565b60405160208183030381529060405291508080610ae690613210565b915050610a87565b5060008582604051602001610b04929190613000565b604051602081830303815290604052805190602001209050610b7c8484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f5d2bb5f5ec347e04ba7e4f2f121f74eb22bfe097dc040b843913f4c7d2add9859250859150611f559050565b610bb85760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b60448201526064016105b0565b6000868152600960205260409020805460ff19166001179055610bdb8686611f6b565b610be53387612027565b5050600160075550505050565b606060018054610491906131d5565b610c0c338383612041565b5050565b6000828152600a602052604090205460ff1615610c40576040516330ce31cb60e21b815260040160405180910390fd5b610c4c84848484612110565b50505050565b6000818152600860209081526040808320805482518185028101850190935280835260609493849084015b82821015610d29578382906000526020600020018054610c9c906131d5565b80601f0160208091040260200160405190810160405280929190818152602001828054610cc8906131d5565b8015610d155780601f10610cea57610100808354040283529160200191610d15565b820191906000526020600020905b815481529060010190602001808311610cf857829003601f168201915b505050505081526020019060010190610c7d565b505050509050600060038251610d3f9190613192565b610d4a906004613173565b610d55906014613147565b905060008167ffffffffffffffff811115610d8057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610db357816020015b6060815260200190600190039081610d9e5790505b5090506040518060600160405280602881526020016133c46028913981600081518110610df057634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603a8152602001613359603a913981600181518110610e3557634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603b81526020016132de603b913981600281518110610e7a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603181526020016132ad6031913981600381518110610ebf57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060600160405280603181526020016133936031913981600481518110610f0457634e487b7160e01b600052603260045260246000fd5b6020026020010181905250610f1885612142565b81600581518110610f3957634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081600681518110610f8557634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280601481526020017301e3a32bc3a103c1e91189811103c9e911a1811160651b81525081600781518110610fde57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160088151811061103057634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260008151811061105c57634e487b7160e01b600052603260045260246000fd5b60200260200101518160098151811061108557634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081600a815181106110d157634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280601481526020017301e3a32bc3a103c1e91189811103c9e911b1811160651b81525081600b8151811061112a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b81525081600c8151811061117c57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826001815181106111a857634e487b7160e01b600052603260045260246000fd5b602002602001015181600d815181106111d157634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081600e8151811061121d57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280601481526020017301e3a32bc3a103c1e91189811103c9e911c1811160651b81525081600f8151811061127657634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b815250816010815181106112c857634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826002815181106112f457634e487b7160e01b600052603260045260246000fd5b60200260200101518160118151811061131d57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b8152508160128151811061136957634e487b7160e01b600052603260045260246000fd5b6020026020010181905250601882106114ca576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189818111605d1b815250816013815181106113cb57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160148151811061141d57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260038151811061144957634e487b7160e01b600052603260045260246000fd5b60200260200101518160158151811061147257634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b815250816016815181106114be57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b601c8210611620576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189918111605d1b8152508160178151811061152157634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160188151811061157357634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260048151811061159f57634e487b7160e01b600052603260045260246000fd5b6020026020010151816019815181106115c857634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081601a8151811061161457634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b60208210611776576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189a18111605d1b81525081601b8151811061167757634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b81525081601c815181106116c957634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826005815181106116f557634e487b7160e01b600052603260045260246000fd5b602002602001015181601d8151811061171e57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081601e8151811061176a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b602482106118cc576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189b18111605d1b81525081601f815181106117cd57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160208151811061181f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508260068151811061184b57634e487b7160e01b600052603260045260246000fd5b60200260200101518160218151811061187457634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b815250816022815181106118c057634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b60288210611a22576040518060400160405280601581526020017401e3a32bc3a103c1e91189811103c9e91189c18111605d1b8152508160238151811061192357634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280600d81526020016c31b630b9b99e913130b9b2911f60991b8152508160248151811061197557634e487b7160e01b600052603260045260246000fd5b6020026020010181905250826007815181106119a157634e487b7160e01b600052603260045260246000fd5b6020026020010151816025815181106119ca57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250604051806040016040528060078152602001661e17ba32bc3a1f60c91b81525081602681518110611a1657634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b604051806040016040528060068152602001651e17b9bb339f60d11b8152508160018351611a509190613192565b81518110611a6e57634e487b7160e01b600052603260045260246000fd5b6020026020010181905250606060005b8251811015611ae55781838281518110611aa857634e487b7160e01b600052603260045260246000fd5b6020026020010151604051602001611ac1929190612e56565b60405160208183030381529060405291508080611add90613210565b915050611a7e565b506000611b22611af488612142565b611afd84612264565b604051602001611b0e929190612e85565b604051602081830303815290604052612264565b905080604051602001611b359190612fbb565b60408051601f19818403018152919052979650505050505050565b600c54611b609062093a80613147565b4211611b9e5760405162461bcd60e51b815260206004820152600d60248201526c10d85b9d081b1bd8dac81e595d609a1b60448201526064016105b0565b6040516331a9108f60e11b81526004810182905233907323581767a106ae21c074b2276d25e5c3e136a68b90636352211e9060240160206040518083038186803b158015611beb57600080fd5b505afa158015611bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c239190612b5a565b6001600160a01b031614611c675760405162461bcd60e51b815260206004820152600b60248201526a26bab9ba1037bbb71026a160a91b60448201526064016105b0565b33611c71826106ac565b6001600160a01b031614611cb75760405162461bcd60e51b815260206004820152600d60248201526c135d5cdd081bdddb88121bdbdd609a1b60448201526064016105b0565b6000908152600a60205260409020805460ff19166001179055565b611cda611ea9565b6001600160a01b038116611d3f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b0565b611d4881611f03565b50565b6000818152600260205260409020546001600160a01b0316611d485760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105b0565b6000818152600260205260408120546001600160a01b03168061047c5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016105b0565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e3f82611daa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611e8233826123d8565b611e9e5760405162461bcd60e51b81526004016105b0906130c8565b610651838383612456565b6006546001600160a01b031633146107e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105b0565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082611f6285846125f2565b14949350505050565b60008281526008602052604090205415611fba5760405162461bcd60e51b815260206004820152601060248201526f121bdbdd08185b1c9958591e481cd95d60821b60448201526064016105b0565b600c54611fca9062093a80613147565b42106120085760405162461bcd60e51b815260206004820152600d60248201526c29b0bb32b2103337b932bb32b960991b60448201526064016105b0565b6000828152600860209081526040909120825161065192840190612934565b610c0c82826040518060200160405280600081525061264d565b816001600160a01b0316836001600160a01b031614156120a35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105b0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61211a33836123d8565b6121365760405162461bcd60e51b81526004016105b0906130c8565b610c4c84848484612680565b6060816121665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612190578061217a81613210565b91506121899050600a8361315f565b915061216a565b60008167ffffffffffffffff8111156121b957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156121e3576020820181803683370190505b5090505b841561225c576121f8600183613192565b9150612205600a8661322b565b612210906030613147565b60f81b81838151811061223357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612255600a8661315f565b94506121e7565b949350505050565b805160609080612284575050604080516020810190915260008152919050565b60006003612293836002613147565b61229d919061315f565b6122a8906004613173565b905060006122b7826020613147565b67ffffffffffffffff8111156122dd57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612307576020820181803683370190505b5090506000604051806060016040528060408152602001613319604091399050600181016020830160005b86811015612393576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612332565b5060038606600181146123ad57600281146123be576123ca565b613d3d60f01b6001198301526123ca565b603d60f81b6000198301525b505050918152949350505050565b6000806123e483611daa565b9050806001600160a01b0316846001600160a01b0316148061242b57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061225c5750836001600160a01b031661244484610514565b6001600160a01b031614949350505050565b826001600160a01b031661246982611daa565b6001600160a01b0316146124cd5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016105b0565b6001600160a01b03821661252f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105b0565b61253a600082611e0a565b6001600160a01b0383166000908152600360205260408120805460019290612563908490613192565b90915550506001600160a01b0382166000908152600360205260408120805460019290612591908490613147565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b8451811015612645576126318286838151811061262457634e487b7160e01b600052603260045260246000fd5b60200260200101516126b3565b91508061263d81613210565b9150506125f7565b509392505050565b61265783836126e5565b6126646000848484612827565b6106515760405162461bcd60e51b81526004016105b090613076565b61268b848484612456565b61269784848484612827565b610c4c5760405162461bcd60e51b81526004016105b090613076565b60008183106126cf5760008281526020849052604090206126de565b60008381526020839052604090205b9392505050565b6001600160a01b03821661273b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105b0565b6000818152600260205260409020546001600160a01b0316156127a05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105b0565b6001600160a01b03821660009081526003602052604081208054600192906127c9908490613147565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561292957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061286b903390899088908890600401613026565b602060405180830381600087803b15801561288557600080fd5b505af19250505080156128b5575060408051601f3d908101601f191682019092526128b291810190612ce3565b60015b61290f573d8080156128e3576040519150601f19603f3d011682016040523d82523d6000602084013e6128e8565b606091505b5080516129075760405162461bcd60e51b81526004016105b090613076565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061225c565b506001949350505050565b828054828255906000526020600020908101928215612981579160200282015b828111156129815782518051612971918491602090910190612991565b5091602001919060010190612954565b5061298d929150612a11565b5090565b82805461299d906131d5565b90600052602060002090601f0160209004810192826129bf5760008555612a05565b82601f106129d857805160ff1916838001178555612a05565b82800160010185558215612a05579182015b82811115612a055782518255916020019190600101906129ea565b5061298d929150612a2e565b8082111561298d576000612a258282612a43565b50600101612a11565b5b8082111561298d5760008155600101612a2f565b508054612a4f906131d5565b6000825580601f10612a5f575050565b601f016020900490600052602060002090810190611d489190612a2e565b600067ffffffffffffffff831115612a9757612a9761326b565b612aaa601f8401601f1916602001613116565b9050828152838383011115612abe57600080fd5b828260208301376000602084830101529392505050565b60008083601f840112612ae6578182fd5b50813567ffffffffffffffff811115612afd578182fd5b6020830191508360208260051b8501011115612b1857600080fd5b9250929050565b600082601f830112612b2f578081fd5b6126de83833560208501612a7d565b600060208284031215612b4f578081fd5b81356126de81613281565b600060208284031215612b6b578081fd5b81516126de81613281565b60008060408385031215612b88578081fd5b8235612b9381613281565b91506020830135612ba381613281565b809150509250929050565b600080600060608486031215612bc2578081fd5b8335612bcd81613281565b92506020840135612bdd81613281565b929592945050506040919091013590565b60008060008060808587031215612c03578081fd5b8435612c0e81613281565b93506020850135612c1e81613281565b925060408501359150606085013567ffffffffffffffff811115612c40578182fd5b8501601f81018713612c50578182fd5b612c5f87823560208401612a7d565b91505092959194509250565b60008060408385031215612c7d578182fd5b8235612c8881613281565b915060208301358015158114612ba3578182fd5b60008060408385031215612cae578182fd5b8235612cb981613281565b946020939093013593505050565b600060208284031215612cd8578081fd5b81356126de81613296565b600060208284031215612cf4578081fd5b81516126de81613296565b600060208284031215612d10578081fd5b5035919050565b60008060008060608587031215612d2c578384fd5b8435935060208086013567ffffffffffffffff80821115612d4b578586fd5b818801915088601f830112612d5e578586fd5b813581811115612d7057612d7061326b565b8060051b612d7f858201613116565b8281528581019085870183870188018e1015612d99578a8bfd5b8a93505b84841015612dd657803586811115612db3578b8cfd5b612dc18f8a838b0101612b1f565b84525060019390930192918701918701612d9d565b5098505050506040880135925080831115612def578485fd5b5050612dfd87828801612ad5565b95989497509550505050565b60008060408385031215612e1b578182fd5b50508035926020909101359150565b60008151808452612e428160208601602086016131a9565b601f01601f19169290920160200192915050565b60008351612e688184602088016131a9565b835190830190612e7c8183602088016131a9565b01949350505050565b6f7b226e616d65223a2022486f6f74202360801b81528251600090612eb18160108501602088016131a9565b7f222c20226465736372697074696f6e223a2022486f6f7420697320616e206f6e6010918401918201527f2d636861696e20636f6c6c656374696f6e20696e737069726564206279204c6f60308201527f6f742e204561636820746f6b656e73206174747269627574657320636f72726560508201527f73706f6e6420746f20746865204d6f6f6e62697264206f66207468652073616d60708201527f652049442e204343302e222c2022696d616765223a2022646174613a696d6167609082015270194bdcdd99cade1b5b0ed8985cd94d8d0b607a1b60b08201528351612fa08160c18401602088016131a9565b61227d60f01b60c1929091019182015260c301949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612ff381601d8501602087016131a9565b91909101601d0192915050565b828152600082516130188160208501602087016131a9565b919091016020019392505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061305990830184612e2a565b9695505050505050565b6020815260006126de6020830184612e2a565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561313f5761313f61326b565b604052919050565b6000821982111561315a5761315a61323f565b500190565b60008261316e5761316e613255565b500490565b600081600019048311821515161561318d5761318d61323f565b500290565b6000828210156131a4576131a461323f565b500390565b60005b838110156131c45781810151838201526020016131ac565b83811115610c4c5750506000910152565b600181811c908216806131e957607f821691505b6020821081141561320a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156132245761322461323f565b5060010190565b60008261323a5761323a613255565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611d4857600080fd5b6001600160e01b031981168114611d4857600080fdfe313470783b207d3c2f7374796c653e203c726563742077696474683d223130302522206865696768743d223130302522203c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a204142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f7072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e66696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e233c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f7376672220a2646970667358221220b1c8a669ac7d59eade9aea68f83c83616b8bb905001605f1ccf93e255285d09564736f6c63430008040033
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.