Source Code
Overview
ETH Balance
0.0106 ETH
Multichain Info
N/A
Loading...
Loading
This contract contains unverified libraries: SignerVerification
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
PetNFT
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import './libs/SignerVerifiation.sol';
contract PetNFT is ERC721, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
Counters.Counter private _tokenIdCounter;
enum Rarity {
Common,
Uncommon,
Rare,
Legendary
}
struct PetInfo {
uint32 level;
Rarity rarity;
}
mapping(uint256 => PetInfo) public petInfos;
address private constant signer = 0x1b8529889149F882f00a65597467026669f5b29C;
uint256 public constant MAX_SUPPLY = 50000;
uint256 public constant MAX_COMMON = 30000;
uint256 public constant MAX_UNCOMMON = 12500;
uint256 public constant MAX_RARE = 5000;
uint256 public constant MAX_LEGENDARY = 2500;
uint256 public commonCount;
uint256 public uncommonCount;
uint256 public rareCount;
uint256 public legendaryCount;
uint256 public constant MINT_PRICE_USD = 2 * 10**18;
uint256 public ethUsdRate = 2000 * 10**18;
constructor() ERC721("PetNFT", "PNFT") {}
function mint(uint random) public payable {
require(_tokenIdCounter.current() < MAX_SUPPLY, "Max supply reached");
require(msg.value >= getMintPriceInETH(), "Insufficient ETH for minting");
uint256 tokenId = _tokenIdCounter.current();
_safeMint(msg.sender, tokenId);
Rarity rarity = _randomRarity(random);
petInfos[tokenId] = PetInfo(1, rarity);
_tokenIdCounter.increment();
}
function levelUp(uint256 tokenId, uint256 validTill, bytes calldata signature) public {
string memory message = string(abi.encodePacked(_addressToString(msg.sender), Strings.toString(petInfos[tokenId].level + 1), Strings.toString(validTill)));
require(
SignerVerification.isMessageVerified(signer, signature, message),
'Signature is wrong'
);
require(_exists(tokenId), "Token does not exist");
require(ownerOf(tokenId) == msg.sender, "You do not own this token");
petInfos[tokenId].level += 1;
}
function _randomRarity(uint random) private returns (Rarity) {
uint256 rand = random;
if (rand < 60 && commonCount < MAX_COMMON) {
commonCount += 1;
return Rarity.Common;
} else if (rand < 85 && uncommonCount < MAX_UNCOMMON) {
uncommonCount += 1;
return Rarity.Uncommon;
} else if (rand < 95 && rareCount < MAX_RARE) {
rareCount += 1;
return Rarity.Rare;
} else if (legendaryCount < MAX_LEGENDARY) {
legendaryCount += 1;
return Rarity.Legendary;
} else {
return _fallbackRarity();
}
}
function _fallbackRarity() private returns (Rarity) {
if (commonCount < MAX_COMMON) {
commonCount += 1;
return Rarity.Common;
} else if (uncommonCount < MAX_UNCOMMON) {
uncommonCount += 1;
return Rarity.Uncommon;
} else if (rareCount < MAX_RARE) {
rareCount += 1;
return Rarity.Rare;
} else {
legendaryCount += 1;
return Rarity.Legendary;
}
}
function _random() private view returns (uint256) {
return uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp, _tokenIdCounter.current())));
}
function getMintPriceInETH() public view returns (uint256) {
return MINT_PRICE_USD.mul(10**18).div(ethUsdRate);
}
function setEthUsdRate(uint256 _rate) public onlyOwner {
ethUsdRate = _rate;
}
function withdraw() public onlyOwner {
uint256 balance = address(this).balance;
require(balance > 0, "No balance to withdraw");
payable(owner()).transfer(balance);
}
function _addressToString(address _addr) internal pure returns (string memory) {
bytes memory addressBytes = abi.encodePacked(_addr);
bytes memory stringBytes = new bytes(40);
for (uint256 i = 0; i < 20; ) {
uint8 leftValue = uint8(addressBytes[i]) / 16;
uint8 rightValue = uint8(addressBytes[i]) - 16 * leftValue;
bytes1 leftChar = leftValue < 10 ? bytes1(leftValue + 48) : bytes1(leftValue + 87);
bytes1 rightChar = rightValue < 10 ? bytes1(rightValue + 48) : bytes1(rightValue + 87);
stringBytes[2 * i] = leftChar;
stringBytes[2 * i + 1] = rightChar;
unchecked {
i++;
}
}
return string(stringBytes);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: invalid token ID");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not token owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
_safeTransfer(from, to, tokenId, data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// 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 (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/Strings.sol';
library SignerVerification {
function isMessageVerified(
address signer,
bytes calldata signature,
string calldata concatenatedParams
) external pure returns (bool) {
return recoverSigner(getPrefixedHashMessage(concatenatedParams), signature) == signer;
}
function getSigner(bytes calldata signature, string calldata concatenatedParams) external pure returns (address) {
return recoverSigner(getPrefixedHashMessage(concatenatedParams), signature);
}
function getPrefixedHashMessage(string calldata concatenatedParams) internal pure returns (bytes32) {
uint256 messageLength = bytes(concatenatedParams).length;
bytes memory prefix = abi.encodePacked('\x19Ethereum Signed Message:\n', Strings.toString(messageLength));
return keccak256(abi.encodePacked(prefix, concatenatedParams));
}
function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) internal pure returns (address) {
(bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);
return ecrecover(_ethSignedMessageHash, v, r, s);
}
function splitSignature(bytes memory sig)
internal
pure
returns (
bytes32 r,
bytes32 s,
uint8 v
)
{
require(sig.length == 65, 'invalid signature length');
assembly {
r := mload(add(sig, 32))
s := mload(add(sig, 64))
v := byte(0, mload(add(sig, 96)))
}
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {
"contracts/libs/SignerVerifiation.sol": {
"SignerVerification": "0x5154ca1e77e6dcae40a7cc0f63ce750e0ed4589e"
}
}
}Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"MAX_COMMON","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_LEGENDARY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_UNCOMMON","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE_USD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commonCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethUsdRate","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":"getMintPriceInETH","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":"legendaryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"validTill","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"levelUp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"random","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"petInfos","outputs":[{"internalType":"uint32","name":"level","type":"uint32"},{"internalType":"enum PetNFT.Rarity","name":"rarity","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rareCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setEthUsdRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uncommonCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080604052686c6b935b8bbd400000600d553480156200001e57600080fd5b506040518060400160405280600681526020017f5065744e465400000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f504e4654000000000000000000000000000000000000000000000000000000008152508160009080519060200190620000a3929190620001b3565b508060019080519060200190620000bc929190620001b3565b505050620000df620000d3620000e560201b60201c565b620000ed60201b60201c565b620002c8565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620001c19062000292565b90600052602060002090601f016020900481019282620001e5576000855562000231565b82601f106200020057805160ff191683800117855562000231565b8280016001018555821562000231579182015b828111156200023057825182559160200191906001019062000213565b5b50905062000240919062000244565b5090565b5b808211156200025f57600081600090555060010162000245565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ab57607f821691505b60208210811415620002c257620002c162000263565b5b50919050565b613d5680620002d86000396000f3fe6080604052600436106101ee5760003560e01c806370a082311161010d578063c87b56dd116100a0578063e04af1e21161006f578063e04af1e2146106be578063e8ac3543146106e9578063e985e9c514610727578063f2fde38b14610764578063fb6f93a41461078d576101ee565b8063c87b56dd14610602578063ce0348c61461063f578063d9ccdf321461066a578063db69cf8914610693576101ee565b806395d89b41116100dc57806395d89b4114610569578063a0712d6814610594578063a22cb465146105b0578063b88d4fde146105d9576101ee565b806370a08231146104bf578063715018a6146104fc5780638b24aa78146105135780638da5cb5b1461053e576101ee565b8063275816531161018557806342842e0e1161015457806342842e0e1461040357806348ccae9b1461042c57806350d6f712146104575780636352211e14610482576101ee565b8063275816531461036b57806332cb6b0c146103965780633b478fc5146103c15780633ccfd60b146103ec576101ee565b80630cd389aa116101c15780630cd389aa146102c157806313a0f42d146102ec578063211eff151461031757806323b872dd14610342576101ee565b806301ffc9a7146101f357806306fdde0314610230578063081812fc1461025b578063095ea7b314610298575b600080fd5b3480156101ff57600080fd5b5061021a60048036038101906102159190612670565b6107b6565b60405161022791906126b8565b60405180910390f35b34801561023c57600080fd5b50610245610898565b604051610252919061276c565b60405180910390f35b34801561026757600080fd5b50610282600480360381019061027d91906127c4565b61092a565b60405161028f9190612832565b60405180910390f35b3480156102a457600080fd5b506102bf60048036038101906102ba9190612879565b610970565b005b3480156102cd57600080fd5b506102d6610a88565b6040516102e391906128c8565b60405180910390f35b3480156102f857600080fd5b50610301610a8e565b60405161030e91906128c8565b60405180910390f35b34801561032357600080fd5b5061032c610a94565b60405161033991906128c8565b60405180910390f35b34801561034e57600080fd5b50610369600480360381019061036491906128e3565b610a9a565b005b34801561037757600080fd5b50610380610afa565b60405161038d91906128c8565b60405180910390f35b3480156103a257600080fd5b506103ab610b00565b6040516103b891906128c8565b60405180910390f35b3480156103cd57600080fd5b506103d6610b06565b6040516103e391906128c8565b60405180910390f35b3480156103f857600080fd5b50610401610b0c565b005b34801561040f57600080fd5b5061042a600480360381019061042591906128e3565b610bad565b005b34801561043857600080fd5b50610441610bcd565b60405161044e91906128c8565b60405180910390f35b34801561046357600080fd5b5061046c610c0b565b60405161047991906128c8565b60405180910390f35b34801561048e57600080fd5b506104a960048036038101906104a491906127c4565b610c11565b6040516104b69190612832565b60405180910390f35b3480156104cb57600080fd5b506104e660048036038101906104e19190612936565b610cc3565b6040516104f391906128c8565b60405180910390f35b34801561050857600080fd5b50610511610d7b565b005b34801561051f57600080fd5b50610528610d8f565b60405161053591906128c8565b60405180910390f35b34801561054a57600080fd5b50610553610d95565b6040516105609190612832565b60405180910390f35b34801561057557600080fd5b5061057e610dbf565b60405161058b919061276c565b60405180910390f35b6105ae60048036038101906105a991906127c4565b610e51565b005b3480156105bc57600080fd5b506105d760048036038101906105d2919061298f565b610fb7565b005b3480156105e557600080fd5b5061060060048036038101906105fb9190612b04565b610fcd565b005b34801561060e57600080fd5b50610629600480360381019061062491906127c4565b61102f565b604051610636919061276c565b60405180910390f35b34801561064b57600080fd5b50610654611097565b60405161066191906128c8565b60405180910390f35b34801561067657600080fd5b50610691600480360381019061068c9190612be7565b61109d565b005b34801561069f57600080fd5b506106a86112ff565b6040516106b591906128c8565b60405180910390f35b3480156106ca57600080fd5b506106d361130b565b6040516106e091906128c8565b60405180910390f35b3480156106f557600080fd5b50610710600480360381019061070b91906127c4565b611311565b60405161071e929190612cf1565b60405180910390f35b34801561073357600080fd5b5061074e60048036038101906107499190612d1a565b611352565b60405161075b91906126b8565b60405180910390f35b34801561077057600080fd5b5061078b60048036038101906107869190612936565b6113e6565b005b34801561079957600080fd5b506107b460048036038101906107af91906127c4565b61146a565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061088157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061089157506108908261147c565b5b9050919050565b6060600080546108a790612d89565b80601f01602080910402602001604051908101604052809291908181526020018280546108d390612d89565b80156109205780601f106108f557610100808354040283529160200191610920565b820191906000526020600020905b81548152906001019060200180831161090357829003601f168201915b5050505050905090565b6000610935826114e6565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061097b82610c11565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e390612e2d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a0b611531565b73ffffffffffffffffffffffffffffffffffffffff161480610a3a5750610a3981610a34611531565b611352565b5b610a79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7090612ebf565b60405180910390fd5b610a838383611539565b505050565b600a5481565b61753081565b6109c481565b610aab610aa5611531565b826115f2565b610aea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae190612f51565b60405180910390fd5b610af5838383611687565b505050565b6130d481565b61c35081565b600d5481565b610b146118ee565b600047905060008111610b5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5390612fbd565b60405180910390fd5b610b64610d95565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ba9573d6000803e3d6000fd5b5050565b610bc883838360405180602001604052806000815250610fcd565b505050565b6000610c06600d54610bf8670de0b6b3a7640000671bc16d674ec8000061196c90919063ffffffff16565b61198290919063ffffffff16565b905090565b60095481565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb190613029565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2b906130bb565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610d836118ee565b610d8d6000611998565b565b61138881565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610dce90612d89565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfa90612d89565b8015610e475780601f10610e1c57610100808354040283529160200191610e47565b820191906000526020600020905b815481529060010190602001808311610e2a57829003601f168201915b5050505050905090565b61c350610e5e6007611a5e565b10610e9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9590613127565b60405180910390fd5b610ea6610bcd565b341015610ee8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edf90613193565b60405180910390fd5b6000610ef46007611a5e565b9050610f003382611a6c565b6000610f0b83611a8a565b90506040518060400160405280600163ffffffff168152602001826003811115610f3857610f37612c7a565b5b8152506008600084815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548160ff02191690836003811115610fa057610f9f612c7a565b5b0217905550905050610fb26007611b85565b505050565b610fc9610fc2611531565b8383611b9b565b5050565b610fde610fd8611531565b836115f2565b61101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612f51565b60405180910390fd5b61102984848484611d08565b50505050565b606061103a826114e6565b6000611044611d64565b90506000815111611064576040518060200160405280600081525061108f565b8061106e84611d7b565b60405160200161107f9291906131ef565b6040516020818303038152906040525b915050919050565b600c5481565b60006110a833611edc565b6110e960016008600089815260200190815260200160002060000160009054906101000a900463ffffffff166110de9190613242565b63ffffffff16611d7b565b6110f286611d7b565b6040516020016111049392919061327c565b6040516020818303038152906040529050735154ca1e77e6dcae40a7cc0f63ce750e0ed4589e636cb80720731b8529889149f882f00a65597467026669f5b29c8585856040518563ffffffff1660e01b81526004016111669493929190613344565b602060405180830381865af4158015611183573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a791906133a0565b6111e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dd90613419565b60405180910390fd5b6111ef856120fd565b61122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122590613485565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1661124e86610c11565b73ffffffffffffffffffffffffffffffffffffffff16146112a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129b906134f1565b60405180910390fd5b60016008600087815260200190815260200160002060000160008282829054906101000a900463ffffffff166112da9190613242565b92506101000a81548163ffffffff021916908363ffffffff1602179055505050505050565b671bc16d674ec8000081565b600b5481565b60086020528060005260406000206000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900460ff16905082565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6113ee6118ee565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561145e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145590613583565b60405180910390fd5b61146781611998565b50565b6114726118ee565b80600d8190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6114ef816120fd565b61152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590613029565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166115ac83610c11565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806115fe83610c11565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611640575061163f8185611352565b5b8061167e57508373ffffffffffffffffffffffffffffffffffffffff166116668461092a565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166116a782610c11565b73ffffffffffffffffffffffffffffffffffffffff16146116fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f490613615565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561176d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611764906136a7565b60405180910390fd5b611778838383612169565b611783600082611539565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117d391906136c7565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461182a91906136fb565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46118e983838361216e565b505050565b6118f6611531565b73ffffffffffffffffffffffffffffffffffffffff16611914610d95565b73ffffffffffffffffffffffffffffffffffffffff161461196a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119619061379d565b60405180910390fd5b565b6000818361197a91906137bd565b905092915050565b600081836119909190613846565b905092915050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b611a86828260405180602001604052806000815250612173565b5050565b600080829050603c81108015611aa35750617530600954105b15611acc57600160096000828254611abb91906136fb565b925050819055506000915050611b80565b605581108015611adf57506130d4600a54105b15611b08576001600a6000828254611af791906136fb565b925050819055506001915050611b80565b605f81108015611b1b5750611388600b54105b15611b44576001600b6000828254611b3391906136fb565b925050819055506002915050611b80565b6109c4600c541015611b74576001600c6000828254611b6391906136fb565b925050819055506003915050611b80565b611b7c6121ce565b9150505b919050565b6001816000016000828254019250508190555050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c01906138c3565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611cfb91906126b8565b60405180910390a3505050565b611d13848484611687565b611d1f8484848461227f565b611d5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5590613955565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b60606000821415611dc3576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611ed7565b600082905060005b60008214611df5578080611dde90613975565b915050600a82611dee9190613846565b9150611dcb565b60008167ffffffffffffffff811115611e1157611e106129d9565b5b6040519080825280601f01601f191660200182016040528015611e435781602001600182028036833780820191505090505b5090505b60008514611ed057600182611e5c91906136c7565b9150600a85611e6b91906139be565b6030611e7791906136fb565b60f81b818381518110611e8d57611e8c6139ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611ec99190613846565b9450611e47565b8093505050505b919050565b6060600082604051602001611ef19190613a66565b60405160208183030381529060405290506000602867ffffffffffffffff811115611f1f57611f1e6129d9565b5b6040519080825280601f01601f191660200182016040528015611f515781602001600182028036833780820191505090505b50905060005b60148110156120f25760006010848381518110611f7757611f766139ef565b5b602001015160f81c60f81b60f81c611f8f9190613a8e565b90506000816010611fa09190613abf565b858481518110611fb357611fb26139ef565b5b602001015160f81c60f81b60f81c611fcb9190613afa565b90506000600a8360ff1610611fef57605783611fe79190613b2e565b60f81b612000565b603083611ffc9190613b2e565b60f81b5b90506000600a8360ff16106120245760578361201c9190613b2e565b60f81b612035565b6030836120319190613b2e565b60f81b5b9050818686600261204691906137bd565b81518110612057576120566139ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508086600187600261209791906137bd565b6120a191906136fb565b815181106120b2576120b16139ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350848060010195505050505050611f57565b508092505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b505050565b505050565b61217d8383612407565b61218a600084848461227f565b6121c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c090613955565b60405180910390fd5b505050565b600061753060095410156121ff576001600960008282546121ef91906136fb565b925050819055506000905061227c565b6130d4600a54101561222e576001600a600082825461221e91906136fb565b925050819055506001905061227c565b611388600b54101561225d576001600b600082825461224d91906136fb565b925050819055506002905061227c565b6001600c600082825461227091906136fb565b92505081905550600390505b90565b60006122a08473ffffffffffffffffffffffffffffffffffffffff166125e1565b156123fa578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026122c9611531565b8786866040518563ffffffff1660e01b81526004016122eb9493929190613bba565b6020604051808303816000875af192505050801561232757506040513d601f19601f820116820180604052508101906123249190613c1b565b60015b6123aa573d8060008114612357576040519150601f19603f3d011682016040523d82523d6000602084013e61235c565b606091505b506000815114156123a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239990613955565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506123ff565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246e90613c94565b60405180910390fd5b612480816120fd565b156124c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124b790613d00565b60405180910390fd5b6124cc60008383612169565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461251c91906136fb565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125dd6000838361216e565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61264d81612618565b811461265857600080fd5b50565b60008135905061266a81612644565b92915050565b6000602082840312156126865761268561260e565b5b60006126948482850161265b565b91505092915050565b60008115159050919050565b6126b28161269d565b82525050565b60006020820190506126cd60008301846126a9565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561270d5780820151818401526020810190506126f2565b8381111561271c576000848401525b50505050565b6000601f19601f8301169050919050565b600061273e826126d3565b61274881856126de565b93506127588185602086016126ef565b61276181612722565b840191505092915050565b600060208201905081810360008301526127868184612733565b905092915050565b6000819050919050565b6127a18161278e565b81146127ac57600080fd5b50565b6000813590506127be81612798565b92915050565b6000602082840312156127da576127d961260e565b5b60006127e8848285016127af565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061281c826127f1565b9050919050565b61282c81612811565b82525050565b60006020820190506128476000830184612823565b92915050565b61285681612811565b811461286157600080fd5b50565b6000813590506128738161284d565b92915050565b600080604083850312156128905761288f61260e565b5b600061289e85828601612864565b92505060206128af858286016127af565b9150509250929050565b6128c28161278e565b82525050565b60006020820190506128dd60008301846128b9565b92915050565b6000806000606084860312156128fc576128fb61260e565b5b600061290a86828701612864565b935050602061291b86828701612864565b925050604061292c868287016127af565b9150509250925092565b60006020828403121561294c5761294b61260e565b5b600061295a84828501612864565b91505092915050565b61296c8161269d565b811461297757600080fd5b50565b60008135905061298981612963565b92915050565b600080604083850312156129a6576129a561260e565b5b60006129b485828601612864565b92505060206129c58582860161297a565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a1182612722565b810181811067ffffffffffffffff82111715612a3057612a2f6129d9565b5b80604052505050565b6000612a43612604565b9050612a4f8282612a08565b919050565b600067ffffffffffffffff821115612a6f57612a6e6129d9565b5b612a7882612722565b9050602081019050919050565b82818337600083830152505050565b6000612aa7612aa284612a54565b612a39565b905082815260208101848484011115612ac357612ac26129d4565b5b612ace848285612a85565b509392505050565b600082601f830112612aeb57612aea6129cf565b5b8135612afb848260208601612a94565b91505092915050565b60008060008060808587031215612b1e57612b1d61260e565b5b6000612b2c87828801612864565b9450506020612b3d87828801612864565b9350506040612b4e878288016127af565b925050606085013567ffffffffffffffff811115612b6f57612b6e612613565b5b612b7b87828801612ad6565b91505092959194509250565b600080fd5b600080fd5b60008083601f840112612ba757612ba66129cf565b5b8235905067ffffffffffffffff811115612bc457612bc3612b87565b5b602083019150836001820283011115612be057612bdf612b8c565b5b9250929050565b60008060008060608587031215612c0157612c0061260e565b5b6000612c0f878288016127af565b9450506020612c20878288016127af565b935050604085013567ffffffffffffffff811115612c4157612c40612613565b5b612c4d87828801612b91565b925092505092959194509250565b600063ffffffff82169050919050565b612c7481612c5b565b82525050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110612cba57612cb9612c7a565b5b50565b6000819050612ccb82612ca9565b919050565b6000612cdb82612cbd565b9050919050565b612ceb81612cd0565b82525050565b6000604082019050612d066000830185612c6b565b612d136020830184612ce2565b9392505050565b60008060408385031215612d3157612d3061260e565b5b6000612d3f85828601612864565b9250506020612d5085828601612864565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612da157607f821691505b60208210811415612db557612db4612d5a565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000612e176021836126de565b9150612e2282612dbb565b604082019050919050565b60006020820190508181036000830152612e4681612e0a565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b6000612ea9603e836126de565b9150612eb482612e4d565b604082019050919050565b60006020820190508181036000830152612ed881612e9c565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b6000612f3b602e836126de565b9150612f4682612edf565b604082019050919050565b60006020820190508181036000830152612f6a81612f2e565b9050919050565b7f4e6f2062616c616e636520746f20776974686472617700000000000000000000600082015250565b6000612fa76016836126de565b9150612fb282612f71565b602082019050919050565b60006020820190508181036000830152612fd681612f9a565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b60006130136018836126de565b915061301e82612fdd565b602082019050919050565b6000602082019050818103600083015261304281613006565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006130a56029836126de565b91506130b082613049565b604082019050919050565b600060208201905081810360008301526130d481613098565b9050919050565b7f4d617820737570706c7920726561636865640000000000000000000000000000600082015250565b60006131116012836126de565b915061311c826130db565b602082019050919050565b6000602082019050818103600083015261314081613104565b9050919050565b7f496e73756666696369656e742045544820666f72206d696e74696e6700000000600082015250565b600061317d601c836126de565b915061318882613147565b602082019050919050565b600060208201905081810360008301526131ac81613170565b9050919050565b600081905092915050565b60006131c9826126d3565b6131d381856131b3565b93506131e38185602086016126ef565b80840191505092915050565b60006131fb82856131be565b915061320782846131be565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061324d82612c5b565b915061325883612c5b565b92508263ffffffff0382111561327157613270613213565b5b828201905092915050565b600061328882866131be565b915061329482856131be565b91506132a082846131be565b9150819050949350505050565b6132b681612811565b82525050565b600082825260208201905092915050565b60006132d983856132bc565b93506132e6838584612a85565b6132ef83612722565b840190509392505050565b600082825260208201905092915050565b6000613316826126d3565b61332081856132fa565b93506133308185602086016126ef565b61333981612722565b840191505092915050565b600060608201905061335960008301876132ad565b818103602083015261336c8185876132cd565b90508181036040830152613380818461330b565b905095945050505050565b60008151905061339a81612963565b92915050565b6000602082840312156133b6576133b561260e565b5b60006133c48482850161338b565b91505092915050565b7f5369676e61747572652069732077726f6e670000000000000000000000000000600082015250565b60006134036012836126de565b915061340e826133cd565b602082019050919050565b60006020820190508181036000830152613432816133f6565b9050919050565b7f546f6b656e20646f6573206e6f74206578697374000000000000000000000000600082015250565b600061346f6014836126de565b915061347a82613439565b602082019050919050565b6000602082019050818103600083015261349e81613462565b9050919050565b7f596f7520646f206e6f74206f776e207468697320746f6b656e00000000000000600082015250565b60006134db6019836126de565b91506134e6826134a5565b602082019050919050565b6000602082019050818103600083015261350a816134ce565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061356d6026836126de565b915061357882613511565b604082019050919050565b6000602082019050818103600083015261359c81613560565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006135ff6025836126de565b915061360a826135a3565b604082019050919050565b6000602082019050818103600083015261362e816135f2565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006136916024836126de565b915061369c82613635565b604082019050919050565b600060208201905081810360008301526136c081613684565b9050919050565b60006136d28261278e565b91506136dd8361278e565b9250828210156136f0576136ef613213565b5b828203905092915050565b60006137068261278e565b91506137118361278e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561374657613745613213565b5b828201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006137876020836126de565b915061379282613751565b602082019050919050565b600060208201905081810360008301526137b68161377a565b9050919050565b60006137c88261278e565b91506137d38361278e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561380c5761380b613213565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006138518261278e565b915061385c8361278e565b92508261386c5761386b613817565b5b828204905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006138ad6019836126de565b91506138b882613877565b602082019050919050565b600060208201905081810360008301526138dc816138a0565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061393f6032836126de565b915061394a826138e3565b604082019050919050565b6000602082019050818103600083015261396e81613932565b9050919050565b60006139808261278e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156139b3576139b2613213565b5b600182019050919050565b60006139c98261278e565b91506139d48361278e565b9250826139e4576139e3613817565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008160601b9050919050565b6000613a3682613a1e565b9050919050565b6000613a4882613a2b565b9050919050565b613a60613a5b82612811565b613a3d565b82525050565b6000613a728284613a4f565b60148201915081905092915050565b600060ff82169050919050565b6000613a9982613a81565b9150613aa483613a81565b925082613ab457613ab3613817565b5b828204905092915050565b6000613aca82613a81565b9150613ad583613a81565b92508160ff0483118215151615613aef57613aee613213565b5b828202905092915050565b6000613b0582613a81565b9150613b1083613a81565b925082821015613b2357613b22613213565b5b828203905092915050565b6000613b3982613a81565b9150613b4483613a81565b92508260ff03821115613b5a57613b59613213565b5b828201905092915050565b600081519050919050565b600082825260208201905092915050565b6000613b8c82613b65565b613b968185613b70565b9350613ba68185602086016126ef565b613baf81612722565b840191505092915050565b6000608082019050613bcf6000830187612823565b613bdc6020830186612823565b613be960408301856128b9565b8181036060830152613bfb8184613b81565b905095945050505050565b600081519050613c1581612644565b92915050565b600060208284031215613c3157613c3061260e565b5b6000613c3f84828501613c06565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000613c7e6020836126de565b9150613c8982613c48565b602082019050919050565b60006020820190508181036000830152613cad81613c71565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613cea601c836126de565b9150613cf582613cb4565b602082019050919050565b60006020820190508181036000830152613d1981613cdd565b905091905056fea2646970667358221220fe136998042d0604648ef4b3a3d475a69bef32b00ff8539d0f899eac1cfaf0df64736f6c634300080a0033
Deployed Bytecode
0x6080604052600436106101ee5760003560e01c806370a082311161010d578063c87b56dd116100a0578063e04af1e21161006f578063e04af1e2146106be578063e8ac3543146106e9578063e985e9c514610727578063f2fde38b14610764578063fb6f93a41461078d576101ee565b8063c87b56dd14610602578063ce0348c61461063f578063d9ccdf321461066a578063db69cf8914610693576101ee565b806395d89b41116100dc57806395d89b4114610569578063a0712d6814610594578063a22cb465146105b0578063b88d4fde146105d9576101ee565b806370a08231146104bf578063715018a6146104fc5780638b24aa78146105135780638da5cb5b1461053e576101ee565b8063275816531161018557806342842e0e1161015457806342842e0e1461040357806348ccae9b1461042c57806350d6f712146104575780636352211e14610482576101ee565b8063275816531461036b57806332cb6b0c146103965780633b478fc5146103c15780633ccfd60b146103ec576101ee565b80630cd389aa116101c15780630cd389aa146102c157806313a0f42d146102ec578063211eff151461031757806323b872dd14610342576101ee565b806301ffc9a7146101f357806306fdde0314610230578063081812fc1461025b578063095ea7b314610298575b600080fd5b3480156101ff57600080fd5b5061021a60048036038101906102159190612670565b6107b6565b60405161022791906126b8565b60405180910390f35b34801561023c57600080fd5b50610245610898565b604051610252919061276c565b60405180910390f35b34801561026757600080fd5b50610282600480360381019061027d91906127c4565b61092a565b60405161028f9190612832565b60405180910390f35b3480156102a457600080fd5b506102bf60048036038101906102ba9190612879565b610970565b005b3480156102cd57600080fd5b506102d6610a88565b6040516102e391906128c8565b60405180910390f35b3480156102f857600080fd5b50610301610a8e565b60405161030e91906128c8565b60405180910390f35b34801561032357600080fd5b5061032c610a94565b60405161033991906128c8565b60405180910390f35b34801561034e57600080fd5b50610369600480360381019061036491906128e3565b610a9a565b005b34801561037757600080fd5b50610380610afa565b60405161038d91906128c8565b60405180910390f35b3480156103a257600080fd5b506103ab610b00565b6040516103b891906128c8565b60405180910390f35b3480156103cd57600080fd5b506103d6610b06565b6040516103e391906128c8565b60405180910390f35b3480156103f857600080fd5b50610401610b0c565b005b34801561040f57600080fd5b5061042a600480360381019061042591906128e3565b610bad565b005b34801561043857600080fd5b50610441610bcd565b60405161044e91906128c8565b60405180910390f35b34801561046357600080fd5b5061046c610c0b565b60405161047991906128c8565b60405180910390f35b34801561048e57600080fd5b506104a960048036038101906104a491906127c4565b610c11565b6040516104b69190612832565b60405180910390f35b3480156104cb57600080fd5b506104e660048036038101906104e19190612936565b610cc3565b6040516104f391906128c8565b60405180910390f35b34801561050857600080fd5b50610511610d7b565b005b34801561051f57600080fd5b50610528610d8f565b60405161053591906128c8565b60405180910390f35b34801561054a57600080fd5b50610553610d95565b6040516105609190612832565b60405180910390f35b34801561057557600080fd5b5061057e610dbf565b60405161058b919061276c565b60405180910390f35b6105ae60048036038101906105a991906127c4565b610e51565b005b3480156105bc57600080fd5b506105d760048036038101906105d2919061298f565b610fb7565b005b3480156105e557600080fd5b5061060060048036038101906105fb9190612b04565b610fcd565b005b34801561060e57600080fd5b50610629600480360381019061062491906127c4565b61102f565b604051610636919061276c565b60405180910390f35b34801561064b57600080fd5b50610654611097565b60405161066191906128c8565b60405180910390f35b34801561067657600080fd5b50610691600480360381019061068c9190612be7565b61109d565b005b34801561069f57600080fd5b506106a86112ff565b6040516106b591906128c8565b60405180910390f35b3480156106ca57600080fd5b506106d361130b565b6040516106e091906128c8565b60405180910390f35b3480156106f557600080fd5b50610710600480360381019061070b91906127c4565b611311565b60405161071e929190612cf1565b60405180910390f35b34801561073357600080fd5b5061074e60048036038101906107499190612d1a565b611352565b60405161075b91906126b8565b60405180910390f35b34801561077057600080fd5b5061078b60048036038101906107869190612936565b6113e6565b005b34801561079957600080fd5b506107b460048036038101906107af91906127c4565b61146a565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061088157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061089157506108908261147c565b5b9050919050565b6060600080546108a790612d89565b80601f01602080910402602001604051908101604052809291908181526020018280546108d390612d89565b80156109205780601f106108f557610100808354040283529160200191610920565b820191906000526020600020905b81548152906001019060200180831161090357829003601f168201915b5050505050905090565b6000610935826114e6565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061097b82610c11565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e390612e2d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a0b611531565b73ffffffffffffffffffffffffffffffffffffffff161480610a3a5750610a3981610a34611531565b611352565b5b610a79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7090612ebf565b60405180910390fd5b610a838383611539565b505050565b600a5481565b61753081565b6109c481565b610aab610aa5611531565b826115f2565b610aea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae190612f51565b60405180910390fd5b610af5838383611687565b505050565b6130d481565b61c35081565b600d5481565b610b146118ee565b600047905060008111610b5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5390612fbd565b60405180910390fd5b610b64610d95565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ba9573d6000803e3d6000fd5b5050565b610bc883838360405180602001604052806000815250610fcd565b505050565b6000610c06600d54610bf8670de0b6b3a7640000671bc16d674ec8000061196c90919063ffffffff16565b61198290919063ffffffff16565b905090565b60095481565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb190613029565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2b906130bb565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610d836118ee565b610d8d6000611998565b565b61138881565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610dce90612d89565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfa90612d89565b8015610e475780601f10610e1c57610100808354040283529160200191610e47565b820191906000526020600020905b815481529060010190602001808311610e2a57829003601f168201915b5050505050905090565b61c350610e5e6007611a5e565b10610e9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9590613127565b60405180910390fd5b610ea6610bcd565b341015610ee8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edf90613193565b60405180910390fd5b6000610ef46007611a5e565b9050610f003382611a6c565b6000610f0b83611a8a565b90506040518060400160405280600163ffffffff168152602001826003811115610f3857610f37612c7a565b5b8152506008600084815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548160ff02191690836003811115610fa057610f9f612c7a565b5b0217905550905050610fb26007611b85565b505050565b610fc9610fc2611531565b8383611b9b565b5050565b610fde610fd8611531565b836115f2565b61101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612f51565b60405180910390fd5b61102984848484611d08565b50505050565b606061103a826114e6565b6000611044611d64565b90506000815111611064576040518060200160405280600081525061108f565b8061106e84611d7b565b60405160200161107f9291906131ef565b6040516020818303038152906040525b915050919050565b600c5481565b60006110a833611edc565b6110e960016008600089815260200190815260200160002060000160009054906101000a900463ffffffff166110de9190613242565b63ffffffff16611d7b565b6110f286611d7b565b6040516020016111049392919061327c565b6040516020818303038152906040529050735154ca1e77e6dcae40a7cc0f63ce750e0ed4589e636cb80720731b8529889149f882f00a65597467026669f5b29c8585856040518563ffffffff1660e01b81526004016111669493929190613344565b602060405180830381865af4158015611183573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a791906133a0565b6111e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111dd90613419565b60405180910390fd5b6111ef856120fd565b61122e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122590613485565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff1661124e86610c11565b73ffffffffffffffffffffffffffffffffffffffff16146112a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129b906134f1565b60405180910390fd5b60016008600087815260200190815260200160002060000160008282829054906101000a900463ffffffff166112da9190613242565b92506101000a81548163ffffffff021916908363ffffffff1602179055505050505050565b671bc16d674ec8000081565b600b5481565b60086020528060005260406000206000915090508060000160009054906101000a900463ffffffff16908060000160049054906101000a900460ff16905082565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6113ee6118ee565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561145e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145590613583565b60405180910390fd5b61146781611998565b50565b6114726118ee565b80600d8190555050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6114ef816120fd565b61152e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152590613029565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166115ac83610c11565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806115fe83610c11565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611640575061163f8185611352565b5b8061167e57508373ffffffffffffffffffffffffffffffffffffffff166116668461092a565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166116a782610c11565b73ffffffffffffffffffffffffffffffffffffffff16146116fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f490613615565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561176d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611764906136a7565b60405180910390fd5b611778838383612169565b611783600082611539565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117d391906136c7565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461182a91906136fb565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46118e983838361216e565b505050565b6118f6611531565b73ffffffffffffffffffffffffffffffffffffffff16611914610d95565b73ffffffffffffffffffffffffffffffffffffffff161461196a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119619061379d565b60405180910390fd5b565b6000818361197a91906137bd565b905092915050565b600081836119909190613846565b905092915050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600001549050919050565b611a86828260405180602001604052806000815250612173565b5050565b600080829050603c81108015611aa35750617530600954105b15611acc57600160096000828254611abb91906136fb565b925050819055506000915050611b80565b605581108015611adf57506130d4600a54105b15611b08576001600a6000828254611af791906136fb565b925050819055506001915050611b80565b605f81108015611b1b5750611388600b54105b15611b44576001600b6000828254611b3391906136fb565b925050819055506002915050611b80565b6109c4600c541015611b74576001600c6000828254611b6391906136fb565b925050819055506003915050611b80565b611b7c6121ce565b9150505b919050565b6001816000016000828254019250508190555050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c01906138c3565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611cfb91906126b8565b60405180910390a3505050565b611d13848484611687565b611d1f8484848461227f565b611d5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5590613955565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b60606000821415611dc3576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611ed7565b600082905060005b60008214611df5578080611dde90613975565b915050600a82611dee9190613846565b9150611dcb565b60008167ffffffffffffffff811115611e1157611e106129d9565b5b6040519080825280601f01601f191660200182016040528015611e435781602001600182028036833780820191505090505b5090505b60008514611ed057600182611e5c91906136c7565b9150600a85611e6b91906139be565b6030611e7791906136fb565b60f81b818381518110611e8d57611e8c6139ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611ec99190613846565b9450611e47565b8093505050505b919050565b6060600082604051602001611ef19190613a66565b60405160208183030381529060405290506000602867ffffffffffffffff811115611f1f57611f1e6129d9565b5b6040519080825280601f01601f191660200182016040528015611f515781602001600182028036833780820191505090505b50905060005b60148110156120f25760006010848381518110611f7757611f766139ef565b5b602001015160f81c60f81b60f81c611f8f9190613a8e565b90506000816010611fa09190613abf565b858481518110611fb357611fb26139ef565b5b602001015160f81c60f81b60f81c611fcb9190613afa565b90506000600a8360ff1610611fef57605783611fe79190613b2e565b60f81b612000565b603083611ffc9190613b2e565b60f81b5b90506000600a8360ff16106120245760578361201c9190613b2e565b60f81b612035565b6030836120319190613b2e565b60f81b5b9050818686600261204691906137bd565b81518110612057576120566139ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508086600187600261209791906137bd565b6120a191906136fb565b815181106120b2576120b16139ef565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350848060010195505050505050611f57565b508092505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b505050565b505050565b61217d8383612407565b61218a600084848461227f565b6121c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c090613955565b60405180910390fd5b505050565b600061753060095410156121ff576001600960008282546121ef91906136fb565b925050819055506000905061227c565b6130d4600a54101561222e576001600a600082825461221e91906136fb565b925050819055506001905061227c565b611388600b54101561225d576001600b600082825461224d91906136fb565b925050819055506002905061227c565b6001600c600082825461227091906136fb565b92505081905550600390505b90565b60006122a08473ffffffffffffffffffffffffffffffffffffffff166125e1565b156123fa578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026122c9611531565b8786866040518563ffffffff1660e01b81526004016122eb9493929190613bba565b6020604051808303816000875af192505050801561232757506040513d601f19601f820116820180604052508101906123249190613c1b565b60015b6123aa573d8060008114612357576040519150601f19603f3d011682016040523d82523d6000602084013e61235c565b606091505b506000815114156123a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239990613955565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506123ff565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246e90613c94565b60405180910390fd5b612480816120fd565b156124c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124b790613d00565b60405180910390fd5b6124cc60008383612169565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461251c91906136fb565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125dd6000838361216e565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61264d81612618565b811461265857600080fd5b50565b60008135905061266a81612644565b92915050565b6000602082840312156126865761268561260e565b5b60006126948482850161265b565b91505092915050565b60008115159050919050565b6126b28161269d565b82525050565b60006020820190506126cd60008301846126a9565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561270d5780820151818401526020810190506126f2565b8381111561271c576000848401525b50505050565b6000601f19601f8301169050919050565b600061273e826126d3565b61274881856126de565b93506127588185602086016126ef565b61276181612722565b840191505092915050565b600060208201905081810360008301526127868184612733565b905092915050565b6000819050919050565b6127a18161278e565b81146127ac57600080fd5b50565b6000813590506127be81612798565b92915050565b6000602082840312156127da576127d961260e565b5b60006127e8848285016127af565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061281c826127f1565b9050919050565b61282c81612811565b82525050565b60006020820190506128476000830184612823565b92915050565b61285681612811565b811461286157600080fd5b50565b6000813590506128738161284d565b92915050565b600080604083850312156128905761288f61260e565b5b600061289e85828601612864565b92505060206128af858286016127af565b9150509250929050565b6128c28161278e565b82525050565b60006020820190506128dd60008301846128b9565b92915050565b6000806000606084860312156128fc576128fb61260e565b5b600061290a86828701612864565b935050602061291b86828701612864565b925050604061292c868287016127af565b9150509250925092565b60006020828403121561294c5761294b61260e565b5b600061295a84828501612864565b91505092915050565b61296c8161269d565b811461297757600080fd5b50565b60008135905061298981612963565b92915050565b600080604083850312156129a6576129a561260e565b5b60006129b485828601612864565b92505060206129c58582860161297a565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612a1182612722565b810181811067ffffffffffffffff82111715612a3057612a2f6129d9565b5b80604052505050565b6000612a43612604565b9050612a4f8282612a08565b919050565b600067ffffffffffffffff821115612a6f57612a6e6129d9565b5b612a7882612722565b9050602081019050919050565b82818337600083830152505050565b6000612aa7612aa284612a54565b612a39565b905082815260208101848484011115612ac357612ac26129d4565b5b612ace848285612a85565b509392505050565b600082601f830112612aeb57612aea6129cf565b5b8135612afb848260208601612a94565b91505092915050565b60008060008060808587031215612b1e57612b1d61260e565b5b6000612b2c87828801612864565b9450506020612b3d87828801612864565b9350506040612b4e878288016127af565b925050606085013567ffffffffffffffff811115612b6f57612b6e612613565b5b612b7b87828801612ad6565b91505092959194509250565b600080fd5b600080fd5b60008083601f840112612ba757612ba66129cf565b5b8235905067ffffffffffffffff811115612bc457612bc3612b87565b5b602083019150836001820283011115612be057612bdf612b8c565b5b9250929050565b60008060008060608587031215612c0157612c0061260e565b5b6000612c0f878288016127af565b9450506020612c20878288016127af565b935050604085013567ffffffffffffffff811115612c4157612c40612613565b5b612c4d87828801612b91565b925092505092959194509250565b600063ffffffff82169050919050565b612c7481612c5b565b82525050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60048110612cba57612cb9612c7a565b5b50565b6000819050612ccb82612ca9565b919050565b6000612cdb82612cbd565b9050919050565b612ceb81612cd0565b82525050565b6000604082019050612d066000830185612c6b565b612d136020830184612ce2565b9392505050565b60008060408385031215612d3157612d3061260e565b5b6000612d3f85828601612864565b9250506020612d5085828601612864565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612da157607f821691505b60208210811415612db557612db4612d5a565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000612e176021836126de565b9150612e2282612dbb565b604082019050919050565b60006020820190508181036000830152612e4681612e0a565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b6000612ea9603e836126de565b9150612eb482612e4d565b604082019050919050565b60006020820190508181036000830152612ed881612e9c565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b6000612f3b602e836126de565b9150612f4682612edf565b604082019050919050565b60006020820190508181036000830152612f6a81612f2e565b9050919050565b7f4e6f2062616c616e636520746f20776974686472617700000000000000000000600082015250565b6000612fa76016836126de565b9150612fb282612f71565b602082019050919050565b60006020820190508181036000830152612fd681612f9a565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b60006130136018836126de565b915061301e82612fdd565b602082019050919050565b6000602082019050818103600083015261304281613006565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006130a56029836126de565b91506130b082613049565b604082019050919050565b600060208201905081810360008301526130d481613098565b9050919050565b7f4d617820737570706c7920726561636865640000000000000000000000000000600082015250565b60006131116012836126de565b915061311c826130db565b602082019050919050565b6000602082019050818103600083015261314081613104565b9050919050565b7f496e73756666696369656e742045544820666f72206d696e74696e6700000000600082015250565b600061317d601c836126de565b915061318882613147565b602082019050919050565b600060208201905081810360008301526131ac81613170565b9050919050565b600081905092915050565b60006131c9826126d3565b6131d381856131b3565b93506131e38185602086016126ef565b80840191505092915050565b60006131fb82856131be565b915061320782846131be565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061324d82612c5b565b915061325883612c5b565b92508263ffffffff0382111561327157613270613213565b5b828201905092915050565b600061328882866131be565b915061329482856131be565b91506132a082846131be565b9150819050949350505050565b6132b681612811565b82525050565b600082825260208201905092915050565b60006132d983856132bc565b93506132e6838584612a85565b6132ef83612722565b840190509392505050565b600082825260208201905092915050565b6000613316826126d3565b61332081856132fa565b93506133308185602086016126ef565b61333981612722565b840191505092915050565b600060608201905061335960008301876132ad565b818103602083015261336c8185876132cd565b90508181036040830152613380818461330b565b905095945050505050565b60008151905061339a81612963565b92915050565b6000602082840312156133b6576133b561260e565b5b60006133c48482850161338b565b91505092915050565b7f5369676e61747572652069732077726f6e670000000000000000000000000000600082015250565b60006134036012836126de565b915061340e826133cd565b602082019050919050565b60006020820190508181036000830152613432816133f6565b9050919050565b7f546f6b656e20646f6573206e6f74206578697374000000000000000000000000600082015250565b600061346f6014836126de565b915061347a82613439565b602082019050919050565b6000602082019050818103600083015261349e81613462565b9050919050565b7f596f7520646f206e6f74206f776e207468697320746f6b656e00000000000000600082015250565b60006134db6019836126de565b91506134e6826134a5565b602082019050919050565b6000602082019050818103600083015261350a816134ce565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061356d6026836126de565b915061357882613511565b604082019050919050565b6000602082019050818103600083015261359c81613560565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006135ff6025836126de565b915061360a826135a3565b604082019050919050565b6000602082019050818103600083015261362e816135f2565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006136916024836126de565b915061369c82613635565b604082019050919050565b600060208201905081810360008301526136c081613684565b9050919050565b60006136d28261278e565b91506136dd8361278e565b9250828210156136f0576136ef613213565b5b828203905092915050565b60006137068261278e565b91506137118361278e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561374657613745613213565b5b828201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006137876020836126de565b915061379282613751565b602082019050919050565b600060208201905081810360008301526137b68161377a565b9050919050565b60006137c88261278e565b91506137d38361278e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561380c5761380b613213565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006138518261278e565b915061385c8361278e565b92508261386c5761386b613817565b5b828204905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006138ad6019836126de565b91506138b882613877565b602082019050919050565b600060208201905081810360008301526138dc816138a0565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061393f6032836126de565b915061394a826138e3565b604082019050919050565b6000602082019050818103600083015261396e81613932565b9050919050565b60006139808261278e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156139b3576139b2613213565b5b600182019050919050565b60006139c98261278e565b91506139d48361278e565b9250826139e4576139e3613817565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008160601b9050919050565b6000613a3682613a1e565b9050919050565b6000613a4882613a2b565b9050919050565b613a60613a5b82612811565b613a3d565b82525050565b6000613a728284613a4f565b60148201915081905092915050565b600060ff82169050919050565b6000613a9982613a81565b9150613aa483613a81565b925082613ab457613ab3613817565b5b828204905092915050565b6000613aca82613a81565b9150613ad583613a81565b92508160ff0483118215151615613aef57613aee613213565b5b828202905092915050565b6000613b0582613a81565b9150613b1083613a81565b925082821015613b2357613b22613213565b5b828203905092915050565b6000613b3982613a81565b9150613b4483613a81565b92508260ff03821115613b5a57613b59613213565b5b828201905092915050565b600081519050919050565b600082825260208201905092915050565b6000613b8c82613b65565b613b968185613b70565b9350613ba68185602086016126ef565b613baf81612722565b840191505092915050565b6000608082019050613bcf6000830187612823565b613bdc6020830186612823565b613be960408301856128b9565b8181036060830152613bfb8184613b81565b905095945050505050565b600081519050613c1581612644565b92915050565b600060208284031215613c3157613c3061260e565b5b6000613c3f84828501613c06565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000613c7e6020836126de565b9150613c8982613c48565b602082019050919050565b60006020820190508181036000830152613cad81613c71565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000613cea601c836126de565b9150613cf582613cb4565b602082019050919050565b60006020820190508181036000830152613d1981613cdd565b905091905056fea2646970667358221220fe136998042d0604648ef4b3a3d475a69bef32b00ff8539d0f899eac1cfaf0df64736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.