编译器
0.8.13+commit.abaa5c0e
文件 1 的 8:Address.sol
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
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");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
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");
}
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);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
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);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
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);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 8:ERC165.sol
pragma solidity ^0.8.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 3 的 8:GENE.sol
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
contract GENE is ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
struct Info {
bytes32 id;
uint160 owner;
uint256 value;
uint8 types;
uint256 bornTime;
}
address public owner;
string private _name = "Micro3 GENE";
string private _symbol = "GENE";
uint256 private _burnCount;
uint8 private _version = 1;
uint256 private _maxSupply = type(uint256).max;
Info[] private _tokens;
mapping(bytes32 => uint256) private _credentials;
mapping(uint256 => string) private _tokenURIs;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
mapping(address => bool) private _minters;
mapping(address => bool) private _whitelists;
mapping(address => bool) private _editors;
bool private _transferable;
string private _baseURI = "";
bool private _initialized;
event EventMinterAdded(address indexed newMinter);
event EventMinterRemoved(address indexed oldMinter);
event EventWhitelisterAdded(address indexed newMinter);
event EventWhitelisterRemoved(address indexed oldMinter);
event EventEditorAdded(address indexed newAddress);
event EventEditorRemoved(address indexed newAddress);
error OnlyMinter();
error OnlyEditor();
error OnlyTransferable();
error IsExists();
error OutBoundIndex();
error IsZeroAddress();
error IsApproved();
error IsOwner();
error IsAdded();
error IsNotAdded();
error IsERC721Received();
error Unauthorized();
modifier onlyMinter() {
if (!_minters[msg.sender]) {
revert OnlyMinter();
}
_;
}
modifier onlyEditor() {
if (!_editors[msg.sender]) {
revert OnlyEditor();
}
_;
}
modifier onlyTransferable(address from, address to) {
if (!_transferable && !_whitelists[to]) {
revert OnlyTransferable();
}
_;
}
modifier onlyExists(uint256 tokenId) {
if (!_exists(tokenId)) {
revert IsExists();
}
_;
}
modifier onlyIsApproved(address sender, uint256 tokenId) {
if (!_isApprovedOrOwner(sender, tokenId)) {
revert IsApproved();
}
_;
}
modifier onlyIsOwner(address sender, uint256 tokenId) {
if (!isOwnerOf(sender, tokenId)) {
revert IsOwner();
}
_;
}
modifier onlyZeroAddress(address sender) {
if (sender == address(0)) {
revert IsZeroAddress();
}
_;
}
modifier onlyOwner() {
require(owner == msg.sender);
_;
}
function init(bytes memory initPayload) external returns (bool) {
if (_initialized) {
revert Unauthorized();
}
address _owner = abi.decode(initPayload, (address));
Info memory _nft = Info(0, 0, 0, 0, 0);
_tokens.push(_nft);
owner = _owner;
_minters[_owner] = true;
_whitelists[_owner] = true;
_editors[_owner] = true;
_transferable = false;
_initialized = true;
return true;
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC165, IERC165)
returns (bool)
{
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function minters(address account) external view returns (bool) {
return _minters[account];
}
function transferable() external view returns (bool) {
return _transferable;
}
function baseURI() external view returns (string memory) {
return _baseURI;
}
function getInfo(uint256 tokenId)
external
view
onlyExists(tokenId)
returns (Info memory)
{
return _tokens[tokenId];
}
function getCredentials(bytes32 _id) external view returns (uint256) {
return _credentials[_id];
}
function getNumMinted() public view returns (uint256) {
return _tokens.length - 1;
}
function totalSupply() external view returns (uint256) {
return getNumMinted() - _burnCount;
}
function tokenOfOwnerByIndex(address _owner, uint256 index)
public
view
returns (uint256)
{
uint256 currentIndex = 0;
for (uint256 i = 1; i < _tokens.length; ) {
if (isOwnerOf(_owner, i)) {
if (currentIndex == index) {
return i;
}
currentIndex += 1;
}
unchecked {
++i;
}
}
revert OutBoundIndex();
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
uint256 tokenIdsIdx;
uint256 tokenIdsLength = balanceOf(_owner);
uint256[] memory tokenIds = new uint256[](tokenIdsLength);
for (uint256 i = 0; tokenIdsIdx != tokenIdsLength; ) {
tokenIds[tokenIdsIdx++] = tokenOfOwnerByIndex(_owner, i);
unchecked {
++i;
}
}
return tokenIds;
}
function tokensOfOwnerByCursor(
address _owner,
uint256 cursor,
uint256 size
) external view returns (uint256[] memory) {
uint256 tokenIdsIdx;
uint256 tokenIdsLength = balanceOf(_owner);
uint256 length = size;
if (length > tokenIdsLength - cursor) {
length = tokenIdsLength - cursor;
}
uint256[] memory tokenIds = new uint256[](length);
for (uint256 i = 0; tokenIdsIdx != length; ) {
tokenIds[tokenIdsIdx++] = tokenOfOwnerByIndex(_owner, i);
unchecked {
++i;
}
}
return tokenIds;
}
function balanceOf(address _owner)
public
view
override
onlyZeroAddress(_owner)
returns (uint256)
{
return _balances[_owner];
}
function ownerOf(uint256 tokenId)
public
view
override
onlyExists(tokenId)
returns (address)
{
return address(_tokens[tokenId].owner);
}
function isOwnerOf(address account, uint256 id) public view returns (bool) {
address _owner = ownerOf(id);
return _owner == account;
}
function name() external view virtual override returns (string memory) {
return _name;
}
function symbol() external view virtual override returns (string memory) {
return _symbol;
}
function version() external view returns (uint8) {
return _version;
}
function tokenURI(uint256 tokenId)
external
view
override
onlyExists(tokenId)
returns (string memory)
{
if (bytes(_baseURI).length > 0) {
return _baseURI;
}
return _tokenURIs[tokenId];
}
function approve(address to, uint256 tokenId) external override {
address _owner = ownerOf(tokenId);
require(to != _owner, "current owner");
require(
msg.sender == _owner || isApprovedForAll(_owner, msg.sender),
"not owner for all"
);
_approve(to, tokenId);
}
function getApproved(uint256 tokenId)
public
view
override
onlyExists(tokenId)
returns (address)
{
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved)
public
override
{
require(operator != msg.sender, "approve to caller");
_operatorApprovals[msg.sender][operator] = approved;
emit ApprovalForAll(msg.sender, operator, approved);
}
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool)
{
if (_minters[_operator]) return true;
return _operatorApprovals[_owner][_operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
)
external
override
onlyTransferable(from, to)
onlyIsApproved(msg.sender, tokenId)
{
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external override onlyTransferable(from, to) {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
)
public
override
onlyTransferable(from, to)
onlyIsApproved(msg.sender, tokenId)
{
_safeTransfer(from, to, tokenId, _data);
}
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal {
_transfer(from, to, tokenId);
if (!_checkOnERC721Received(from, to, tokenId, _data)) {
revert IsERC721Received();
}
}
function _exists(uint256 tokenId) internal view returns (bool) {
return tokenId > 0 && tokenId <= getNumMinted();
}
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
returns (bool)
{
address _owner = ownerOf(tokenId);
return (spender == _owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(_owner, spender) ||
_whitelists[spender]);
}
function editInfo(
address _owner,
uint256 _tokenId,
uint256 _value
)
external
onlyEditor
onlyExists(_tokenId)
onlyIsOwner(_owner, _tokenId)
returns (uint256)
{
_tokens[_tokenId].value = _value;
return _tokenId;
}
function mint(
address _account,
uint256 _value,
bytes32 _id,
uint8 _types,
string calldata _tokenURI
) external onlyMinter onlyZeroAddress(_account) returns (uint256) {
bytes32 hashKey = generateHashKey(_account, _id, _types);
if (_credentials[hashKey] > 0) {
revert IsExists();
}
uint256 tokenId = _tokens.length;
Info memory _nft = Info(
_id,
uint160(_account),
_value,
_types,
block.timestamp
);
_balances[_account] += 1;
_tokens.push(_nft);
_credentials[hashKey] = tokenId;
_tokenURIs[tokenId] = _tokenURI;
if (!_checkOnERC721Received(address(0), _account, tokenId, "")) {
revert IsERC721Received();
}
emit Transfer(address(0), _account, tokenId);
return tokenId;
}
function burn(address account, uint256 id)
external
onlyMinter
onlyIsApproved(msg.sender, id)
onlyIsOwner(account, id)
{
_approve(address(0), id);
_burnCount++;
_balances[account] -= 1;
bytes32 hashKey = generateHashKey(
account,
_tokens[id].id,
_tokens[id].types
);
_credentials[hashKey] = 0;
_tokens[id].id = 0;
_tokens[id].owner = 0;
_tokens[id].value = 0;
_tokens[id].types = 0;
_tokens[id].bornTime = 0;
_tokenURIs[id] = "";
emit Transfer(account, address(0), id);
}
function generateHashKey(
address account,
bytes32 id,
uint8 types
) internal pure returns (bytes32) {
return keccak256(abi.encode(account, id, types));
}
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual onlyIsOwner(from, tokenId) onlyZeroAddress(to) {
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_tokens[tokenId].owner = uint160(to);
emit Transfer(from, to, tokenId);
}
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ownerOf(tokenId), to, tokenId);
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try
IERC721Receiver(to).onERC721Received(
msg.sender,
from,
tokenId,
_data
)
returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
return true;
}
function setBaseURI(string memory _uri) external onlyOwner {
_baseURI = _uri;
}
function setTransferable(bool _trans) external onlyOwner {
_transferable = _trans;
}
function setName(string calldata newName) external onlyOwner {
_name = newName;
}
function setSymbol(string calldata newSymbol) external onlyOwner {
_symbol = newSymbol;
}
function addMinter(address minter)
external
onlyOwner
onlyZeroAddress(minter)
{
if (_minters[minter]) {
revert IsAdded();
}
_minters[minter] = true;
emit EventMinterAdded(minter);
}
function removeMinter(address minter) external onlyOwner {
if (!_minters[minter]) {
revert IsNotAdded();
}
delete _minters[minter];
emit EventMinterRemoved(minter);
}
function addWhitelist(address whitelist)
external
onlyOwner
onlyZeroAddress(whitelist)
{
if (_whitelists[whitelist]) {
revert IsAdded();
}
_whitelists[whitelist] = true;
emit EventWhitelisterAdded(whitelist);
}
function removeWhitelist(address whitelist) external onlyOwner {
if (!_whitelists[whitelist]) {
revert IsNotAdded();
}
delete _whitelists[whitelist];
emit EventWhitelisterRemoved(whitelist);
}
function addEditor(address editor)
external
onlyOwner
onlyZeroAddress(editor)
{
if (_editors[editor]) {
revert IsAdded();
}
_editors[editor] = true;
emit EventEditorAdded(editor);
}
function removeEditor(address editor) external onlyOwner {
if (!_editors[editor]) {
revert IsNotAdded();
}
delete _editors[editor];
emit EventEditorRemoved(editor);
}
}
文件 4 的 8:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 5 的 8:IERC721.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
文件 6 的 8:IERC721Metadata.sol
pragma solidity ^0.8.0;
import "../IERC721.sol";
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 7 的 8:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 8 的 8:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
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);
}
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);
}
}
{
"compilationTarget": {
"contracts/staking/GENE.sol": "GENE"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"name":"IsAdded","type":"error"},{"inputs":[],"name":"IsApproved","type":"error"},{"inputs":[],"name":"IsERC721Received","type":"error"},{"inputs":[],"name":"IsExists","type":"error"},{"inputs":[],"name":"IsNotAdded","type":"error"},{"inputs":[],"name":"IsOwner","type":"error"},{"inputs":[],"name":"IsZeroAddress","type":"error"},{"inputs":[],"name":"OnlyEditor","type":"error"},{"inputs":[],"name":"OnlyMinter","type":"error"},{"inputs":[],"name":"OnlyTransferable","type":"error"},{"inputs":[],"name":"OutBoundIndex","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"EventEditorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"EventEditorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newMinter","type":"address"}],"name":"EventMinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMinter","type":"address"}],"name":"EventMinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newMinter","type":"address"}],"name":"EventWhitelisterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMinter","type":"address"}],"name":"EventWhitelisterRemoved","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":[{"internalType":"address","name":"editor","type":"address"}],"name":"addEditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"whitelist","type":"address"}],"name":"addWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"editInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"getCredentials","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getInfo","outputs":[{"components":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint160","name":"owner","type":"uint160"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint8","name":"types","type":"uint8"},{"internalType":"uint256","name":"bornTime","type":"uint256"}],"internalType":"struct GENE.Info","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"initPayload","type":"bytes"}],"name":"init","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"uint8","name":"_types","type":"uint8"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"editor","type":"address"}],"name":"removeEditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"whitelist","type":"address"}],"name":"removeWhitelist","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":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_trans","type":"bool"}],"name":"setTransferable","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":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"tokensOfOwnerByCursor","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]