ERC-721
Overview
Max Total Supply
1,300 YOKAI
Holders
373
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 YOKAILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
YokaiGenesis
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721 pragma solidity ^0.8.4; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./ERC721A.sol"; abstract contract YokaiBox { function transferFrom( address from, address to, uint256 tokenId ) public virtual; function balanceOf(address owner) public virtual returns (uint256); } abstract contract XToken { function burn(uint256 tokenId) public virtual; } contract YokaiGenesis is ERC721A, Ownable, ReentrancyGuard { string private _baseURIextended = "https://yokailabs.net/genesis/metadata/"; uint256 private MAX_SUPPLY = 4444; address public yokaiBoxContractAddress = address(0x264DCF6BABB849DDb9fe7380C698fEfFDA1811c4); address public RescueXToken; bool isHappyHour = true; bool isRescue = false; uint256[] public burnedYokai; bool isAdminMinted = false; uint256 public immutable revealStartTime = 1662904800; constructor() ERC721A("Yokai Genesis", "YOKAI") {} function adminMint(uint256 tokenId) public onlyOwner { YokaiBox yContract = YokaiBox(yokaiBoxContractAddress); require(!isAdminMinted, "admin already minted"); _safeMint(msg.sender, 1, ""); yContract.transferFrom( msg.sender, address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B), tokenId ); burnedYokai.push(tokenId); } function reveal(uint256[] memory tokenList) public { require(block.timestamp >= revealStartTime, "not start"); YokaiBox yContract = YokaiBox(yokaiBoxContractAddress); uint256 ts = totalSupply(); if ( yContract.balanceOf( address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B) ) + tokenList.length <= 777 && isHappyHour ) { require( ts + tokenList.length * 2 <= MAX_SUPPLY, "exceed max amount" ); _safeMint(msg.sender, tokenList.length * 2, ""); } else { require(ts + tokenList.length <= MAX_SUPPLY, "exceed max amount"); _safeMint(msg.sender, tokenList.length, ""); } for (uint256 i = 0; i < tokenList.length; i++) { yContract.transferFrom( msg.sender, address(0x83FD84E8619D6d957FF2469256aDCfC6B5Df1B2B), tokenList[i] ); burnedYokai.push(tokenList[i]); } } function rescue(uint256 tokenId) public { XToken xToken = XToken(RescueXToken); require(totalSupply() + 1 <= MAX_SUPPLY, "exceed max amount"); require(isRescue, "meow..."); xToken.burn(tokenId); _safeMint(msg.sender, 1, ""); } function toggleHappyHour() public onlyOwner { isHappyHour = !isHappyHour; } function toggleRescue() public onlyOwner { isRescue = !isRescue; } function _baseURI() internal view virtual override returns (string memory) { return _baseURIextended; } function setBaseURI(string memory baseURI_) external onlyOwner { _baseURIextended = baseURI_; } function setYokaiBoxContractAddress(address newAddress) public onlyOwner { yokaiBoxContractAddress = newAddress; } function setXtokenContractAddress(address newAddress) public onlyOwner { RescueXToken = newAddress; } function withdraw() public onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } function withdrawTokens(IERC20 token) public onlyOwner { uint256 balance = token.balanceOf(address(this)); token.transfer(msg.sender, balance); } function getBurnedList() public view returns (uint256[] memory) { return burnedYokai; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees 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. */ 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 Returns the rebuilt hash obtained by traversing a Merklee 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } } /** * @dev See {IERC721Enumerable-tokenByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenByIndex(uint256 index) public view override returns (uint256) { uint256 numMintedSoFar = _currentIndex; uint256 tokenIdsIdx; // Counter overflow is impossible as the loop breaks when // uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (!ownership.burned) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } revert TokenIndexOutOfBounds(); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds(); uint256 numMintedSoFar = _currentIndex; uint256 tokenIdsIdx; address currOwnershipAddr; // Counter overflow is impossible as the loop breaks when // uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } // Execution should never reach this point. revert(); } /** * @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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _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 { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if ( safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data) ) { revert TransferToNonERC721ReceiverImplementer(); } updatedIndex++; } _currentIndex = uint128(updatedIndex); } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership .startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership .startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // 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 v4.4.1 (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`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 `IERC721.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/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
{ "optimizer": { "enabled": false, "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":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerIndexOutOfBounds","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TokenIndexOutOfBounds","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":"RescueXToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnedYokai","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnedList","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenList","type":"uint256[]"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setXtokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setYokaiBoxContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleHappyHour","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleRescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yokaiBoxContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040526040518060600160405280602781526020016200461760279139600a90805190602001906200003592919062000297565b5061115c600b5573264dcf6babb849ddb9fe7380c698feffda1811c4600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600d60146101000a81548160ff0219169083151502179055506000600d60156101000a81548160ff0219169083151502179055506000600f60006101000a81548160ff02191690831515021790555063631de9e0608090815250348015620000fa57600080fd5b506040518060400160405280600d81526020017f596f6b61692047656e65736973000000000000000000000000000000000000008152506040518060400160405280600581526020017f594f4b414900000000000000000000000000000000000000000000000000000081525081600290805190602001906200017f92919062000297565b5080600390805190602001906200019892919062000297565b505050620001bb620001af620001c960201b60201c565b620001d160201b60201c565b6001600981905550620003ac565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620002a59062000347565b90600052602060002090601f016020900481019282620002c9576000855562000315565b82601f10620002e457805160ff191683800117855562000315565b8280016001018555821562000315579182015b8281111562000314578251825591602001919060010190620002f7565b5b50905062000324919062000328565b5090565b5b808211156200034357600081600090555060010162000329565b5090565b600060028204905060018216806200036057607f821691505b602082108114156200037757620003766200037d565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b608051614248620003cf600039600081816118bd0152611ec401526142486000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80636ac053ad1161011a578063ac31851b116100ad578063c87b56dd1161007c578063c87b56dd14610575578063cc0bef84146105a5578063e985e9c5146105c3578063f2fde38b146105f3578063f44a79151461060f57610206565b8063ac31851b14610517578063b88d4fde14610521578063b93f208a1461053d578063c1f261231461055957610206565b80638da5cb5b116100e95780638da5cb5b146104a157806394b99eb0146104bf57806395d89b41146104dd578063a22cb465146104fb57610206565b80636ac053ad1461044157806370a082311461045d578063715018a61461048d5780638140bf7a1461049757610206565b80633ccfd60b1161019d57806355f804b31161016c57806355f804b31461039f5780635df8da00146103bb5780636352211e146103d957806367e9dcb21461040957806369b3f2ad1461042557610206565b80633ccfd60b1461032d57806342842e0e1461033757806349df728c146103535780634f6ccce71461036f57610206565b806318160ddd116101d957806318160ddd146102a557806323b872dd146102c35780632df9c363146102df5780632f745c59146102fd57610206565b806301ffc9a71461020b57806306fdde031461023b578063081812fc14610259578063095ea7b314610289575b600080fd5b61022560048036038101906102209190613673565b61063f565b6040516102329190613ab5565b60405180910390f35b610243610789565b6040516102509190613ad0565b60405180910390f35b610273600480360381019061026e919061372f565b61081b565b60405161028091906139cc565b60405180910390f35b6102a3600480360381019061029e91906135cd565b610897565b005b6102ad6109a2565b6040516102ba9190613bb2565b60405180910390f35b6102dd60048036038101906102d891906134c7565b6109b0565b005b6102e76109c0565b6040516102f49190613a93565b60405180910390f35b610317600480360381019061031291906135cd565b610a18565b6040516103249190613bb2565b60405180910390f35b610335610bf1565b005b610351600480360381019061034c91906134c7565b610cbc565b005b61036d600480360381019061036891906136c5565b610cdc565b005b6103896004803603810190610384919061372f565b610e77565b6040516103969190613bb2565b60405180910390f35b6103b960048036038101906103b491906136ee565b610fbc565b005b6103c3611052565b6040516103d091906139cc565b60405180910390f35b6103f360048036038101906103ee919061372f565b611078565b60405161040091906139cc565b60405180910390f35b610423600480360381019061041e9190613462565b61108e565b005b61043f600480360381019061043a9190613462565b61114e565b005b61045b6004803603810190610456919061372f565b61120e565b005b61047760048036038101906104729190613462565b611366565b6040516104849190613bb2565b60405180910390f35b610495611436565b005b61049f6114be565b005b6104a9611566565b6040516104b691906139cc565b60405180910390f35b6104c7611590565b6040516104d491906139cc565b60405180910390f35b6104e56115b6565b6040516104f29190613ad0565b60405180910390f35b61051560048036038101906105109190613591565b611648565b005b61051f6117c0565b005b61053b60048036038101906105369190613516565b611868565b005b61055760048036038101906105529190613609565b6118bb565b005b610573600480360381019061056e919061372f565b611c65565b005b61058f600480360381019061058a919061372f565b611e23565b60405161059c9190613ad0565b60405180910390f35b6105ad611ec2565b6040516105ba9190613bb2565b60405180910390f35b6105dd60048036038101906105d8919061348b565b611ee6565b6040516105ea9190613ab5565b60405180910390f35b61060d60048036038101906106089190613462565b611f7a565b005b6106296004803603810190610624919061372f565b612072565b6040516106369190613bb2565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061070a57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061077257507f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610782575061078182612096565b5b9050919050565b60606002805461079890613ed9565b80601f01602080910402602001604051908101604052809291908181526020018280546107c490613ed9565b80156108115780601f106107e657610100808354040283529160200191610811565b820191906000526020600020905b8154815290600101906020018083116107f457829003601f168201915b5050505050905090565b600061082682612100565b61085c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108a282611078565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561090a576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661092961213a565b73ffffffffffffffffffffffffffffffffffffffff161415801561095b57506109598161095461213a565b611ee6565b155b15610992576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61099d838383612142565b505050565b600060015460005403905090565b6109bb8383836121f4565b505050565b6060600e805480602002602001604051908101604052809291908181526020018280548015610a0e57602002820191906000526020600020905b8154815260200190600101908083116109fa575b5050505050905090565b6000610a2383611366565b8210610a5b576040517f0ddac30e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054905060008060005b83811015610be5576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050806040015115610b445750610bd8565b600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614610b8457806000015192505b8773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bd65786841415610bcd578195505050505050610beb565b83806001019450505b505b8080600101915050610a67565b50600080fd5b92915050565b610bf961213a565b73ffffffffffffffffffffffffffffffffffffffff16610c17611566565b73ffffffffffffffffffffffffffffffffffffffff1614610c6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6490613b52565b60405180910390fd5b60004790503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610cb8573d6000803e3d6000fd5b5050565b610cd783838360405180602001604052806000815250611868565b505050565b610ce461213a565b73ffffffffffffffffffffffffffffffffffffffff16610d02611566565b73ffffffffffffffffffffffffffffffffffffffff1614610d58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4f90613b52565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610d9391906139cc565b60206040518083038186803b158015610dab57600080fd5b505afa158015610dbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de39190613758565b90508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610e20929190613a6a565b602060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e72919061364a565b505050565b60008060005490506000805b82811015610f84576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff16151515158152505090508060400151610f765785831415610f6d5781945050505050610fb7565b82806001019350505b508080600101915050610e83565b506040517fa723001c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b610fc461213a565b73ffffffffffffffffffffffffffffffffffffffff16610fe2611566565b73ffffffffffffffffffffffffffffffffffffffff1614611038576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102f90613b52565b60405180910390fd5b80600a908051906020019061104e92919061316e565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611083826126e5565b600001519050919050565b61109661213a565b73ffffffffffffffffffffffffffffffffffffffff166110b4611566565b73ffffffffffffffffffffffffffffffffffffffff161461110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110190613b52565b60405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61115661213a565b73ffffffffffffffffffffffffffffffffffffffff16611174611566565b73ffffffffffffffffffffffffffffffffffffffff16146111ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c190613b52565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600b5460016112426109a2565b61124c9190613cfc565b111561128d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128490613b92565b60405180910390fd5b600d60159054906101000a900460ff166112dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d390613b72565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166342966c68836040518263ffffffff1660e01b81526004016113159190613bb2565b600060405180830381600087803b15801561132f57600080fd5b505af1158015611343573d6000803e3d6000fd5b5050505061136233600160405180602001604052806000815250612961565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113ce576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff169050919050565b61143e61213a565b73ffffffffffffffffffffffffffffffffffffffff1661145c611566565b73ffffffffffffffffffffffffffffffffffffffff16146114b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a990613b52565b60405180910390fd5b6114bc6000612973565b565b6114c661213a565b73ffffffffffffffffffffffffffffffffffffffff166114e4611566565b73ffffffffffffffffffffffffffffffffffffffff161461153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153190613b52565b60405180910390fd5b600d60149054906101000a900460ff1615600d60146101000a81548160ff021916908315150217905550565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600380546115c590613ed9565b80601f01602080910402602001604051908101604052809291908181526020018280546115f190613ed9565b801561163e5780601f106116135761010080835404028352916020019161163e565b820191906000526020600020905b81548152906001019060200180831161162157829003601f168201915b5050505050905090565b61165061213a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b5576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600760006116c261213a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661176f61213a565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117b49190613ab5565b60405180910390a35050565b6117c861213a565b73ffffffffffffffffffffffffffffffffffffffff166117e6611566565b73ffffffffffffffffffffffffffffffffffffffff161461183c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183390613b52565b60405180910390fd5b600d60159054906101000a900460ff1615600d60156101000a81548160ff021916908315150217905550565b6118738484846121f4565b61187f84848484612a39565b6118b5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b7f000000000000000000000000000000000000000000000000000000000000000042101561191e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191590613af2565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061194f6109a2565b905061030983518373ffffffffffffffffffffffffffffffffffffffff166370a082317383fd84e8619d6d957ff2469256adcfc6b5df1b2b6040518263ffffffff1660e01b81526004016119a391906139cc565b602060405180830381600087803b1580156119bd57600080fd5b505af11580156119d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f59190613758565b6119ff9190613cfc565b11158015611a195750600d60149054906101000a900460ff165b15611aa757600b5460028451611a2f9190613d83565b82611a3a9190613cfc565b1115611a7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7290613b92565b60405180910390fd5b611aa23360028551611a8d9190613d83565b60405180602001604052806000815250612961565b611b14565b600b54835182611ab79190613cfc565b1115611af8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aef90613b92565b60405180910390fd5b611b1333845160405180602001604052806000815250612961565b5b60005b8351811015611c5f578273ffffffffffffffffffffffffffffffffffffffff166323b872dd337383fd84e8619d6d957ff2469256adcfc6b5df1b2b878581518110611b8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b8152600401611bb1939291906139e7565b600060405180830381600087803b158015611bcb57600080fd5b505af1158015611bdf573d6000803e3d6000fd5b50505050600e848281518110611c1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558080611c5790613f3c565b915050611b17565b50505050565b611c6d61213a565b73ffffffffffffffffffffffffffffffffffffffff16611c8b611566565b73ffffffffffffffffffffffffffffffffffffffff1614611ce1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd890613b52565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600f60009054906101000a900460ff1615611d58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4f90613b32565b60405180910390fd5b611d7333600160405180602001604052806000815250612961565b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd337383fd84e8619d6d957ff2469256adcfc6b5df1b2b856040518463ffffffff1660e01b8152600401611dc4939291906139e7565b600060405180830381600087803b158015611dde57600080fd5b505af1158015611df2573d6000803e3d6000fd5b50505050600e8290806001815401808255809150506001900390600052602060002001600090919091909150555050565b6060611e2e82612100565b611e64576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e6e612bc7565b9050600081511415611e8f5760405180602001604052806000815250611eba565b80611e9984612c59565b604051602001611eaa9291906139a8565b6040516020818303038152906040525b915050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611f8261213a565b73ffffffffffffffffffffffffffffffffffffffff16611fa0611566565b73ffffffffffffffffffffffffffffffffffffffff1614611ff6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fed90613b52565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205d90613b12565b60405180910390fd5b61206f81612973565b50565b600e818154811061208257600080fd5b906000526020600020016000915090505481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000805482108015612133575060046000838152602001908152602001600020600001601c9054906101000a900460ff16155b9050919050565b600033905090565b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006121ff826126e5565b90506000816000015173ffffffffffffffffffffffffffffffffffffffff1661222661213a565b73ffffffffffffffffffffffffffffffffffffffff1614806122595750612258826000015161225361213a565b611ee6565b5b8061229e575061226761213a565b73ffffffffffffffffffffffffffffffffffffffff166122868461081b565b73ffffffffffffffffffffffffffffffffffffffff16145b9050806122d7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614612340576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156123a7576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123b48585856001612e06565b6123c46000848460000151612142565b6001600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160392506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550836004600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600085815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506000600184019050600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612675576000548110156126745782600001516004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082602001516004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5b50828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46126de8585856001612e0c565b5050505050565b6126ed6131f4565b600082905060005481101561292a576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050806040015161292857600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161461280c57809250505061295c565b5b60011561292757818060019003925050600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161461292257809250505061295c565b61280d565b5b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b61296e8383836001612e12565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000612a5a8473ffffffffffffffffffffffffffffffffffffffff1661315b565b15612bba578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612a8361213a565b8786866040518563ffffffff1660e01b8152600401612aa59493929190613a1e565b602060405180830381600087803b158015612abf57600080fd5b505af1925050508015612af057506040513d601f19601f82011682018060405250810190612aed919061369c565b60015b612b6a573d8060008114612b20576040519150601f19603f3d011682016040523d82523d6000602084013e612b25565b606091505b50600081511415612b62576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612bbf565b600190505b949350505050565b6060600a8054612bd690613ed9565b80601f0160208091040260200160405190810160405280929190818152602001828054612c0290613ed9565b8015612c4f5780601f10612c2457610100808354040283529160200191612c4f565b820191906000526020600020905b815481529060010190602001808311612c3257829003601f168201915b5050505050905090565b60606000821415612ca1576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612e01565b600082905060005b60008214612cd3578080612cbc90613f3c565b915050600a82612ccc9190613d52565b9150612ca9565b60008167ffffffffffffffff811115612d15577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d475781602001600182028036833780820191505090505b5090505b60008514612dfa57600182612d609190613ddd565b9150600a85612d6f9190613f85565b6030612d7b9190613cfc565b60f81b818381518110612db7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612df39190613d52565b9450612d4b565b8093505050505b919050565b50505050565b50505050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612e7f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000841415612eba576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612ec76000868387612e06565b83600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160088282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550846004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550600081905060005b8581101561312c57818773ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a48380156130e057506130de6000888488612a39565b155b15613117576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81806001019250508080600101915050613065565b50806fffffffffffffffffffffffffffffffff16600081905550506131546000868387612e0c565b5050505050565b600080823b905060008111915050919050565b82805461317a90613ed9565b90600052602060002090601f01602090048101928261319c57600085556131e3565b82601f106131b557805160ff19168380011785556131e3565b828001600101855582156131e3579182015b828111156131e25782518255916020019190600101906131c7565b5b5090506131f09190613237565b5090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff1681526020016000151581525090565b5b80821115613250576000816000905550600101613238565b5090565b600061326761326284613bf2565b613bcd565b9050808382526020820190508285602086028201111561328657600080fd5b60005b858110156132b6578161329c8882613438565b845260208401935060208301925050600181019050613289565b5050509392505050565b60006132d36132ce84613c1e565b613bcd565b9050828152602081018484840111156132eb57600080fd5b6132f6848285613e97565b509392505050565b600061331161330c84613c4f565b613bcd565b90508281526020810184848401111561332957600080fd5b613334848285613e97565b509392505050565b60008135905061334b8161419f565b92915050565b600082601f83011261336257600080fd5b8135613372848260208601613254565b91505092915050565b60008135905061338a816141b6565b92915050565b60008151905061339f816141b6565b92915050565b6000813590506133b4816141cd565b92915050565b6000815190506133c9816141cd565b92915050565b600082601f8301126133e057600080fd5b81356133f08482602086016132c0565b91505092915050565b600081359050613408816141e4565b92915050565b600082601f83011261341f57600080fd5b813561342f8482602086016132fe565b91505092915050565b600081359050613447816141fb565b92915050565b60008151905061345c816141fb565b92915050565b60006020828403121561347457600080fd5b60006134828482850161333c565b91505092915050565b6000806040838503121561349e57600080fd5b60006134ac8582860161333c565b92505060206134bd8582860161333c565b9150509250929050565b6000806000606084860312156134dc57600080fd5b60006134ea8682870161333c565b93505060206134fb8682870161333c565b925050604061350c86828701613438565b9150509250925092565b6000806000806080858703121561352c57600080fd5b600061353a8782880161333c565b945050602061354b8782880161333c565b935050604061355c87828801613438565b925050606085013567ffffffffffffffff81111561357957600080fd5b613585878288016133cf565b91505092959194509250565b600080604083850312156135a457600080fd5b60006135b28582860161333c565b92505060206135c38582860161337b565b9150509250929050565b600080604083850312156135e057600080fd5b60006135ee8582860161333c565b92505060206135ff85828601613438565b9150509250929050565b60006020828403121561361b57600080fd5b600082013567ffffffffffffffff81111561363557600080fd5b61364184828501613351565b91505092915050565b60006020828403121561365c57600080fd5b600061366a84828501613390565b91505092915050565b60006020828403121561368557600080fd5b6000613693848285016133a5565b91505092915050565b6000602082840312156136ae57600080fd5b60006136bc848285016133ba565b91505092915050565b6000602082840312156136d757600080fd5b60006136e5848285016133f9565b91505092915050565b60006020828403121561370057600080fd5b600082013567ffffffffffffffff81111561371a57600080fd5b6137268482850161340e565b91505092915050565b60006020828403121561374157600080fd5b600061374f84828501613438565b91505092915050565b60006020828403121561376a57600080fd5b60006137788482850161344d565b91505092915050565b600061378d838361398a565b60208301905092915050565b6137a281613e11565b82525050565b60006137b382613c90565b6137bd8185613cbe565b93506137c883613c80565b8060005b838110156137f95781516137e08882613781565b97506137eb83613cb1565b9250506001810190506137cc565b5085935050505092915050565b61380f81613e23565b82525050565b600061382082613c9b565b61382a8185613ccf565b935061383a818560208601613ea6565b61384381614072565b840191505092915050565b600061385982613ca6565b6138638185613ce0565b9350613873818560208601613ea6565b61387c81614072565b840191505092915050565b600061389282613ca6565b61389c8185613cf1565b93506138ac818560208601613ea6565b80840191505092915050565b60006138c5600983613ce0565b91506138d082614083565b602082019050919050565b60006138e8602683613ce0565b91506138f3826140ac565b604082019050919050565b600061390b601483613ce0565b9150613916826140fb565b602082019050919050565b600061392e602083613ce0565b915061393982614124565b602082019050919050565b6000613951600783613ce0565b915061395c8261414d565b602082019050919050565b6000613974601183613ce0565b915061397f82614176565b602082019050919050565b61399381613e8d565b82525050565b6139a281613e8d565b82525050565b60006139b48285613887565b91506139c08284613887565b91508190509392505050565b60006020820190506139e16000830184613799565b92915050565b60006060820190506139fc6000830186613799565b613a096020830185613799565b613a166040830184613999565b949350505050565b6000608082019050613a336000830187613799565b613a406020830186613799565b613a4d6040830185613999565b8181036060830152613a5f8184613815565b905095945050505050565b6000604082019050613a7f6000830185613799565b613a8c6020830184613999565b9392505050565b60006020820190508181036000830152613aad81846137a8565b905092915050565b6000602082019050613aca6000830184613806565b92915050565b60006020820190508181036000830152613aea818461384e565b905092915050565b60006020820190508181036000830152613b0b816138b8565b9050919050565b60006020820190508181036000830152613b2b816138db565b9050919050565b60006020820190508181036000830152613b4b816138fe565b9050919050565b60006020820190508181036000830152613b6b81613921565b9050919050565b60006020820190508181036000830152613b8b81613944565b9050919050565b60006020820190508181036000830152613bab81613967565b9050919050565b6000602082019050613bc76000830184613999565b92915050565b6000613bd7613be8565b9050613be38282613f0b565b919050565b6000604051905090565b600067ffffffffffffffff821115613c0d57613c0c614043565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c3957613c38614043565b5b613c4282614072565b9050602081019050919050565b600067ffffffffffffffff821115613c6a57613c69614043565b5b613c7382614072565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000613d0782613e8d565b9150613d1283613e8d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613d4757613d46613fb6565b5b828201905092915050565b6000613d5d82613e8d565b9150613d6883613e8d565b925082613d7857613d77613fe5565b5b828204905092915050565b6000613d8e82613e8d565b9150613d9983613e8d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613dd257613dd1613fb6565b5b828202905092915050565b6000613de882613e8d565b9150613df383613e8d565b925082821015613e0657613e05613fb6565b5b828203905092915050565b6000613e1c82613e6d565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000613e6682613e11565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015613ec4578082015181840152602081019050613ea9565b83811115613ed3576000848401525b50505050565b60006002820490506001821680613ef157607f821691505b60208210811415613f0557613f04614014565b5b50919050565b613f1482614072565b810181811067ffffffffffffffff82111715613f3357613f32614043565b5b80604052505050565b6000613f4782613e8d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613f7a57613f79613fb6565b5b600182019050919050565b6000613f9082613e8d565b9150613f9b83613e8d565b925082613fab57613faa613fe5565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f6e6f742073746172740000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f61646d696e20616c7265616479206d696e746564000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6d656f772e2e2e00000000000000000000000000000000000000000000000000600082015250565b7f657863656564206d617820616d6f756e74000000000000000000000000000000600082015250565b6141a881613e11565b81146141b357600080fd5b50565b6141bf81613e23565b81146141ca57600080fd5b50565b6141d681613e2f565b81146141e157600080fd5b50565b6141ed81613e5b565b81146141f857600080fd5b50565b61420481613e8d565b811461420f57600080fd5b5056fea26469706673582212206ad3c2a6df66b1b9d0bc3a194ef2f6b57958fc485926566bb02fa850c05f7ba764736f6c6343000804003368747470733a2f2f796f6b61696c6162732e6e65742f67656e657369732f6d657461646174612f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636ac053ad1161011a578063ac31851b116100ad578063c87b56dd1161007c578063c87b56dd14610575578063cc0bef84146105a5578063e985e9c5146105c3578063f2fde38b146105f3578063f44a79151461060f57610206565b8063ac31851b14610517578063b88d4fde14610521578063b93f208a1461053d578063c1f261231461055957610206565b80638da5cb5b116100e95780638da5cb5b146104a157806394b99eb0146104bf57806395d89b41146104dd578063a22cb465146104fb57610206565b80636ac053ad1461044157806370a082311461045d578063715018a61461048d5780638140bf7a1461049757610206565b80633ccfd60b1161019d57806355f804b31161016c57806355f804b31461039f5780635df8da00146103bb5780636352211e146103d957806367e9dcb21461040957806369b3f2ad1461042557610206565b80633ccfd60b1461032d57806342842e0e1461033757806349df728c146103535780634f6ccce71461036f57610206565b806318160ddd116101d957806318160ddd146102a557806323b872dd146102c35780632df9c363146102df5780632f745c59146102fd57610206565b806301ffc9a71461020b57806306fdde031461023b578063081812fc14610259578063095ea7b314610289575b600080fd5b61022560048036038101906102209190613673565b61063f565b6040516102329190613ab5565b60405180910390f35b610243610789565b6040516102509190613ad0565b60405180910390f35b610273600480360381019061026e919061372f565b61081b565b60405161028091906139cc565b60405180910390f35b6102a3600480360381019061029e91906135cd565b610897565b005b6102ad6109a2565b6040516102ba9190613bb2565b60405180910390f35b6102dd60048036038101906102d891906134c7565b6109b0565b005b6102e76109c0565b6040516102f49190613a93565b60405180910390f35b610317600480360381019061031291906135cd565b610a18565b6040516103249190613bb2565b60405180910390f35b610335610bf1565b005b610351600480360381019061034c91906134c7565b610cbc565b005b61036d600480360381019061036891906136c5565b610cdc565b005b6103896004803603810190610384919061372f565b610e77565b6040516103969190613bb2565b60405180910390f35b6103b960048036038101906103b491906136ee565b610fbc565b005b6103c3611052565b6040516103d091906139cc565b60405180910390f35b6103f360048036038101906103ee919061372f565b611078565b60405161040091906139cc565b60405180910390f35b610423600480360381019061041e9190613462565b61108e565b005b61043f600480360381019061043a9190613462565b61114e565b005b61045b6004803603810190610456919061372f565b61120e565b005b61047760048036038101906104729190613462565b611366565b6040516104849190613bb2565b60405180910390f35b610495611436565b005b61049f6114be565b005b6104a9611566565b6040516104b691906139cc565b60405180910390f35b6104c7611590565b6040516104d491906139cc565b60405180910390f35b6104e56115b6565b6040516104f29190613ad0565b60405180910390f35b61051560048036038101906105109190613591565b611648565b005b61051f6117c0565b005b61053b60048036038101906105369190613516565b611868565b005b61055760048036038101906105529190613609565b6118bb565b005b610573600480360381019061056e919061372f565b611c65565b005b61058f600480360381019061058a919061372f565b611e23565b60405161059c9190613ad0565b60405180910390f35b6105ad611ec2565b6040516105ba9190613bb2565b60405180910390f35b6105dd60048036038101906105d8919061348b565b611ee6565b6040516105ea9190613ab5565b60405180910390f35b61060d60048036038101906106089190613462565b611f7a565b005b6106296004803603810190610624919061372f565b612072565b6040516106369190613bb2565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061070a57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061077257507f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610782575061078182612096565b5b9050919050565b60606002805461079890613ed9565b80601f01602080910402602001604051908101604052809291908181526020018280546107c490613ed9565b80156108115780601f106107e657610100808354040283529160200191610811565b820191906000526020600020905b8154815290600101906020018083116107f457829003601f168201915b5050505050905090565b600061082682612100565b61085c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108a282611078565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561090a576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661092961213a565b73ffffffffffffffffffffffffffffffffffffffff161415801561095b57506109598161095461213a565b611ee6565b155b15610992576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61099d838383612142565b505050565b600060015460005403905090565b6109bb8383836121f4565b505050565b6060600e805480602002602001604051908101604052809291908181526020018280548015610a0e57602002820191906000526020600020905b8154815260200190600101908083116109fa575b5050505050905090565b6000610a2383611366565b8210610a5b576040517f0ddac30e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054905060008060005b83811015610be5576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050806040015115610b445750610bd8565b600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614610b8457806000015192505b8773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bd65786841415610bcd578195505050505050610beb565b83806001019450505b505b8080600101915050610a67565b50600080fd5b92915050565b610bf961213a565b73ffffffffffffffffffffffffffffffffffffffff16610c17611566565b73ffffffffffffffffffffffffffffffffffffffff1614610c6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6490613b52565b60405180910390fd5b60004790503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610cb8573d6000803e3d6000fd5b5050565b610cd783838360405180602001604052806000815250611868565b505050565b610ce461213a565b73ffffffffffffffffffffffffffffffffffffffff16610d02611566565b73ffffffffffffffffffffffffffffffffffffffff1614610d58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4f90613b52565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610d9391906139cc565b60206040518083038186803b158015610dab57600080fd5b505afa158015610dbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de39190613758565b90508173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610e20929190613a6a565b602060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e72919061364a565b505050565b60008060005490506000805b82811015610f84576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff16151515158152505090508060400151610f765785831415610f6d5781945050505050610fb7565b82806001019350505b508080600101915050610e83565b506040517fa723001c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b610fc461213a565b73ffffffffffffffffffffffffffffffffffffffff16610fe2611566565b73ffffffffffffffffffffffffffffffffffffffff1614611038576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102f90613b52565b60405180910390fd5b80600a908051906020019061104e92919061316e565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611083826126e5565b600001519050919050565b61109661213a565b73ffffffffffffffffffffffffffffffffffffffff166110b4611566565b73ffffffffffffffffffffffffffffffffffffffff161461110a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110190613b52565b60405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61115661213a565b73ffffffffffffffffffffffffffffffffffffffff16611174611566565b73ffffffffffffffffffffffffffffffffffffffff16146111ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c190613b52565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600b5460016112426109a2565b61124c9190613cfc565b111561128d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128490613b92565b60405180910390fd5b600d60159054906101000a900460ff166112dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d390613b72565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166342966c68836040518263ffffffff1660e01b81526004016113159190613bb2565b600060405180830381600087803b15801561132f57600080fd5b505af1158015611343573d6000803e3d6000fd5b5050505061136233600160405180602001604052806000815250612961565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113ce576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff169050919050565b61143e61213a565b73ffffffffffffffffffffffffffffffffffffffff1661145c611566565b73ffffffffffffffffffffffffffffffffffffffff16146114b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a990613b52565b60405180910390fd5b6114bc6000612973565b565b6114c661213a565b73ffffffffffffffffffffffffffffffffffffffff166114e4611566565b73ffffffffffffffffffffffffffffffffffffffff161461153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153190613b52565b60405180910390fd5b600d60149054906101000a900460ff1615600d60146101000a81548160ff021916908315150217905550565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600380546115c590613ed9565b80601f01602080910402602001604051908101604052809291908181526020018280546115f190613ed9565b801561163e5780601f106116135761010080835404028352916020019161163e565b820191906000526020600020905b81548152906001019060200180831161162157829003601f168201915b5050505050905090565b61165061213a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116b5576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600760006116c261213a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661176f61213a565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117b49190613ab5565b60405180910390a35050565b6117c861213a565b73ffffffffffffffffffffffffffffffffffffffff166117e6611566565b73ffffffffffffffffffffffffffffffffffffffff161461183c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183390613b52565b60405180910390fd5b600d60159054906101000a900460ff1615600d60156101000a81548160ff021916908315150217905550565b6118738484846121f4565b61187f84848484612a39565b6118b5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b7f00000000000000000000000000000000000000000000000000000000631de9e042101561191e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191590613af2565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600061194f6109a2565b905061030983518373ffffffffffffffffffffffffffffffffffffffff166370a082317383fd84e8619d6d957ff2469256adcfc6b5df1b2b6040518263ffffffff1660e01b81526004016119a391906139cc565b602060405180830381600087803b1580156119bd57600080fd5b505af11580156119d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f59190613758565b6119ff9190613cfc565b11158015611a195750600d60149054906101000a900460ff165b15611aa757600b5460028451611a2f9190613d83565b82611a3a9190613cfc565b1115611a7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7290613b92565b60405180910390fd5b611aa23360028551611a8d9190613d83565b60405180602001604052806000815250612961565b611b14565b600b54835182611ab79190613cfc565b1115611af8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aef90613b92565b60405180910390fd5b611b1333845160405180602001604052806000815250612961565b5b60005b8351811015611c5f578273ffffffffffffffffffffffffffffffffffffffff166323b872dd337383fd84e8619d6d957ff2469256adcfc6b5df1b2b878581518110611b8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b8152600401611bb1939291906139e7565b600060405180830381600087803b158015611bcb57600080fd5b505af1158015611bdf573d6000803e3d6000fd5b50505050600e848281518110611c1e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558080611c5790613f3c565b915050611b17565b50505050565b611c6d61213a565b73ffffffffffffffffffffffffffffffffffffffff16611c8b611566565b73ffffffffffffffffffffffffffffffffffffffff1614611ce1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cd890613b52565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600f60009054906101000a900460ff1615611d58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4f90613b32565b60405180910390fd5b611d7333600160405180602001604052806000815250612961565b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd337383fd84e8619d6d957ff2469256adcfc6b5df1b2b856040518463ffffffff1660e01b8152600401611dc4939291906139e7565b600060405180830381600087803b158015611dde57600080fd5b505af1158015611df2573d6000803e3d6000fd5b50505050600e8290806001815401808255809150506001900390600052602060002001600090919091909150555050565b6060611e2e82612100565b611e64576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e6e612bc7565b9050600081511415611e8f5760405180602001604052806000815250611eba565b80611e9984612c59565b604051602001611eaa9291906139a8565b6040516020818303038152906040525b915050919050565b7f00000000000000000000000000000000000000000000000000000000631de9e081565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611f8261213a565b73ffffffffffffffffffffffffffffffffffffffff16611fa0611566565b73ffffffffffffffffffffffffffffffffffffffff1614611ff6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fed90613b52565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205d90613b12565b60405180910390fd5b61206f81612973565b50565b600e818154811061208257600080fd5b906000526020600020016000915090505481565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000805482108015612133575060046000838152602001908152602001600020600001601c9054906101000a900460ff16155b9050919050565b600033905090565b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006121ff826126e5565b90506000816000015173ffffffffffffffffffffffffffffffffffffffff1661222661213a565b73ffffffffffffffffffffffffffffffffffffffff1614806122595750612258826000015161225361213a565b611ee6565b5b8061229e575061226761213a565b73ffffffffffffffffffffffffffffffffffffffff166122868461081b565b73ffffffffffffffffffffffffffffffffffffffff16145b9050806122d7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff1614612340576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156123a7576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123b48585856001612e06565b6123c46000848460000151612142565b6001600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160392506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550836004600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600085815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506000600184019050600073ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612675576000548110156126745782600001516004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082602001516004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5b50828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46126de8585856001612e0c565b5050505050565b6126ed6131f4565b600082905060005481101561292a576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050806040015161292857600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161461280c57809250505061295c565b5b60011561292757818060019003925050600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff161461292257809250505061295c565b61280d565b5b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b61296e8383836001612e12565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000612a5a8473ffffffffffffffffffffffffffffffffffffffff1661315b565b15612bba578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612a8361213a565b8786866040518563ffffffff1660e01b8152600401612aa59493929190613a1e565b602060405180830381600087803b158015612abf57600080fd5b505af1925050508015612af057506040513d601f19601f82011682018060405250810190612aed919061369c565b60015b612b6a573d8060008114612b20576040519150601f19603f3d011682016040523d82523d6000602084013e612b25565b606091505b50600081511415612b62576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612bbf565b600190505b949350505050565b6060600a8054612bd690613ed9565b80601f0160208091040260200160405190810160405280929190818152602001828054612c0290613ed9565b8015612c4f5780601f10612c2457610100808354040283529160200191612c4f565b820191906000526020600020905b815481529060010190602001808311612c3257829003601f168201915b5050505050905090565b60606000821415612ca1576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612e01565b600082905060005b60008214612cd3578080612cbc90613f3c565b915050600a82612ccc9190613d52565b9150612ca9565b60008167ffffffffffffffff811115612d15577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d475781602001600182028036833780820191505090505b5090505b60008514612dfa57600182612d609190613ddd565b9150600a85612d6f9190613f85565b6030612d7b9190613cfc565b60f81b818381518110612db7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612df39190613d52565b9450612d4b565b8093505050505b919050565b50505050565b50505050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612e7f576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000841415612eba576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612ec76000868387612e06565b83600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160088282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550846004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550600081905060005b8581101561312c57818773ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a48380156130e057506130de6000888488612a39565b155b15613117576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81806001019250508080600101915050613065565b50806fffffffffffffffffffffffffffffffff16600081905550506131546000868387612e0c565b5050505050565b600080823b905060008111915050919050565b82805461317a90613ed9565b90600052602060002090601f01602090048101928261319c57600085556131e3565b82601f106131b557805160ff19168380011785556131e3565b828001600101855582156131e3579182015b828111156131e25782518255916020019190600101906131c7565b5b5090506131f09190613237565b5090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff1681526020016000151581525090565b5b80821115613250576000816000905550600101613238565b5090565b600061326761326284613bf2565b613bcd565b9050808382526020820190508285602086028201111561328657600080fd5b60005b858110156132b6578161329c8882613438565b845260208401935060208301925050600181019050613289565b5050509392505050565b60006132d36132ce84613c1e565b613bcd565b9050828152602081018484840111156132eb57600080fd5b6132f6848285613e97565b509392505050565b600061331161330c84613c4f565b613bcd565b90508281526020810184848401111561332957600080fd5b613334848285613e97565b509392505050565b60008135905061334b8161419f565b92915050565b600082601f83011261336257600080fd5b8135613372848260208601613254565b91505092915050565b60008135905061338a816141b6565b92915050565b60008151905061339f816141b6565b92915050565b6000813590506133b4816141cd565b92915050565b6000815190506133c9816141cd565b92915050565b600082601f8301126133e057600080fd5b81356133f08482602086016132c0565b91505092915050565b600081359050613408816141e4565b92915050565b600082601f83011261341f57600080fd5b813561342f8482602086016132fe565b91505092915050565b600081359050613447816141fb565b92915050565b60008151905061345c816141fb565b92915050565b60006020828403121561347457600080fd5b60006134828482850161333c565b91505092915050565b6000806040838503121561349e57600080fd5b60006134ac8582860161333c565b92505060206134bd8582860161333c565b9150509250929050565b6000806000606084860312156134dc57600080fd5b60006134ea8682870161333c565b93505060206134fb8682870161333c565b925050604061350c86828701613438565b9150509250925092565b6000806000806080858703121561352c57600080fd5b600061353a8782880161333c565b945050602061354b8782880161333c565b935050604061355c87828801613438565b925050606085013567ffffffffffffffff81111561357957600080fd5b613585878288016133cf565b91505092959194509250565b600080604083850312156135a457600080fd5b60006135b28582860161333c565b92505060206135c38582860161337b565b9150509250929050565b600080604083850312156135e057600080fd5b60006135ee8582860161333c565b92505060206135ff85828601613438565b9150509250929050565b60006020828403121561361b57600080fd5b600082013567ffffffffffffffff81111561363557600080fd5b61364184828501613351565b91505092915050565b60006020828403121561365c57600080fd5b600061366a84828501613390565b91505092915050565b60006020828403121561368557600080fd5b6000613693848285016133a5565b91505092915050565b6000602082840312156136ae57600080fd5b60006136bc848285016133ba565b91505092915050565b6000602082840312156136d757600080fd5b60006136e5848285016133f9565b91505092915050565b60006020828403121561370057600080fd5b600082013567ffffffffffffffff81111561371a57600080fd5b6137268482850161340e565b91505092915050565b60006020828403121561374157600080fd5b600061374f84828501613438565b91505092915050565b60006020828403121561376a57600080fd5b60006137788482850161344d565b91505092915050565b600061378d838361398a565b60208301905092915050565b6137a281613e11565b82525050565b60006137b382613c90565b6137bd8185613cbe565b93506137c883613c80565b8060005b838110156137f95781516137e08882613781565b97506137eb83613cb1565b9250506001810190506137cc565b5085935050505092915050565b61380f81613e23565b82525050565b600061382082613c9b565b61382a8185613ccf565b935061383a818560208601613ea6565b61384381614072565b840191505092915050565b600061385982613ca6565b6138638185613ce0565b9350613873818560208601613ea6565b61387c81614072565b840191505092915050565b600061389282613ca6565b61389c8185613cf1565b93506138ac818560208601613ea6565b80840191505092915050565b60006138c5600983613ce0565b91506138d082614083565b602082019050919050565b60006138e8602683613ce0565b91506138f3826140ac565b604082019050919050565b600061390b601483613ce0565b9150613916826140fb565b602082019050919050565b600061392e602083613ce0565b915061393982614124565b602082019050919050565b6000613951600783613ce0565b915061395c8261414d565b602082019050919050565b6000613974601183613ce0565b915061397f82614176565b602082019050919050565b61399381613e8d565b82525050565b6139a281613e8d565b82525050565b60006139b48285613887565b91506139c08284613887565b91508190509392505050565b60006020820190506139e16000830184613799565b92915050565b60006060820190506139fc6000830186613799565b613a096020830185613799565b613a166040830184613999565b949350505050565b6000608082019050613a336000830187613799565b613a406020830186613799565b613a4d6040830185613999565b8181036060830152613a5f8184613815565b905095945050505050565b6000604082019050613a7f6000830185613799565b613a8c6020830184613999565b9392505050565b60006020820190508181036000830152613aad81846137a8565b905092915050565b6000602082019050613aca6000830184613806565b92915050565b60006020820190508181036000830152613aea818461384e565b905092915050565b60006020820190508181036000830152613b0b816138b8565b9050919050565b60006020820190508181036000830152613b2b816138db565b9050919050565b60006020820190508181036000830152613b4b816138fe565b9050919050565b60006020820190508181036000830152613b6b81613921565b9050919050565b60006020820190508181036000830152613b8b81613944565b9050919050565b60006020820190508181036000830152613bab81613967565b9050919050565b6000602082019050613bc76000830184613999565b92915050565b6000613bd7613be8565b9050613be38282613f0b565b919050565b6000604051905090565b600067ffffffffffffffff821115613c0d57613c0c614043565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c3957613c38614043565b5b613c4282614072565b9050602081019050919050565b600067ffffffffffffffff821115613c6a57613c69614043565b5b613c7382614072565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000613d0782613e8d565b9150613d1283613e8d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613d4757613d46613fb6565b5b828201905092915050565b6000613d5d82613e8d565b9150613d6883613e8d565b925082613d7857613d77613fe5565b5b828204905092915050565b6000613d8e82613e8d565b9150613d9983613e8d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613dd257613dd1613fb6565b5b828202905092915050565b6000613de882613e8d565b9150613df383613e8d565b925082821015613e0657613e05613fb6565b5b828203905092915050565b6000613e1c82613e6d565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000613e6682613e11565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015613ec4578082015181840152602081019050613ea9565b83811115613ed3576000848401525b50505050565b60006002820490506001821680613ef157607f821691505b60208210811415613f0557613f04614014565b5b50919050565b613f1482614072565b810181811067ffffffffffffffff82111715613f3357613f32614043565b5b80604052505050565b6000613f4782613e8d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613f7a57613f79613fb6565b5b600182019050919050565b6000613f9082613e8d565b9150613f9b83613e8d565b925082613fab57613faa613fe5565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f6e6f742073746172740000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f61646d696e20616c7265616479206d696e746564000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6d656f772e2e2e00000000000000000000000000000000000000000000000000600082015250565b7f657863656564206d617820616d6f756e74000000000000000000000000000000600082015250565b6141a881613e11565b81146141b357600080fd5b50565b6141bf81613e23565b81146141ca57600080fd5b50565b6141d681613e2f565b81146141e157600080fd5b50565b6141ed81613e5b565b81146141f857600080fd5b50565b61420481613e8d565b811461420f57600080fd5b5056fea26469706673582212206ad3c2a6df66b1b9d0bc3a194ef2f6b57958fc485926566bb02fa850c05f7ba764736f6c63430008040033
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.