编译器
0.8.24+commit.e11b9ed9
文件 1 的 31:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 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
) internal 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 的 31:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 3 的 31:CustomRoyalties.sol
pragma solidity ^0.8.9;
import "./rarible/RoyaltiesV2.sol";
import "./rarible/LibPart.sol";
import "./rarible/LibRoyaltiesV2.sol";
import "./IERC2981.sol";
abstract contract CustomRoyalties is RoyaltiesV2, IERC2981 {
event RoyaltiesForAllSet(
address prevRecipient,
uint256 prevRoyalties,
address newRecipient,
uint256 newRoyalties
);
address payable public royaltyRecipient;
uint256 public royaltyPercentageBasisPoints;
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
function _setRoyaltiesForAll(
address payable recipientAddress,
uint96 percentageBasisPoints
) internal {
emit RoyaltiesForAllSet(
royaltyRecipient,
royaltyPercentageBasisPoints,
recipientAddress,
percentageBasisPoints
);
royaltyRecipient = recipientAddress;
royaltyPercentageBasisPoints = percentageBasisPoints;
}
function getRaribleV2Royalties(uint256 id)
external
view
override
returns (LibPart.Part[] memory)
{
LibPart.Part[] memory _royalties = new LibPart.Part[](1);
_royalties[0] = LibPart.Part(
royaltyRecipient,
uint96(royaltyPercentageBasisPoints)
);
return _royalties;
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
if (royaltyRecipient == address(0)) {
return (address(0), 0);
}
return (
royaltyRecipient,
(_salePrice * royaltyPercentageBasisPoints) / 10000
);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return
interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES ||
interfaceId == _INTERFACE_ID_ERC2981;
}
}
文件 4 的 31:EIP712Base.sol
pragma solidity ^0.8.9;
import {Initializable} from "./Initializable.sol";
contract EIP712Base is Initializable {
struct EIP712Domain {
string name;
string version;
address verifyingContract;
bytes32 salt;
}
string constant public ERC712_VERSION = "1";
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
bytes(
"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
)
);
bytes32 internal domainSeperator;
function _initializeEIP712(
string memory name
)
internal
initializer
{
_setDomainSeperator(name);
}
function _setDomainSeperator(string memory name) internal {
domainSeperator = keccak256(
abi.encode(
EIP712_DOMAIN_TYPEHASH,
keccak256(bytes(name)),
keccak256(bytes(ERC712_VERSION)),
address(this),
bytes32(getChainId())
)
);
}
function getDomainSeperator() public view returns (bytes32) {
return domainSeperator;
}
function getChainId() public view returns (uint256) {
uint256 id;
assembly {
id := chainid()
}
return id;
}
function toTypedMessageHash(bytes32 messageHash)
internal
view
returns (bytes32)
{
return
keccak256(
abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
);
}
}
文件 5 的 31: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;
}
}
文件 6 的 31: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";
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
string private _name;
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
function _baseURI() internal view virtual returns (string memory) {
return "";
}
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
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");
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
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"
);
}
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);
}
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
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);
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
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);
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
文件 7 的 31:ERC721Burnable.sol
pragma solidity ^0.8.0;
import "../ERC721.sol";
import "../../../utils/Context.sol";
abstract contract ERC721Burnable is Context, ERC721 {
function burn(uint256 tokenId) public virtual {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
_burn(tokenId);
}
}
文件 8 的 31:ERC721MintManagementV2.sol
pragma solidity ^0.8.13;
import "./ERC721TradableV2.sol";
error OnlyAuthorizedMinter();
error NonMatchingArgumentLengths();
abstract contract ERC721MintManagementV2 is ERC721TradableV2 {
event MinterPrivilegesChange(address indexed account, bool trusted);
mapping(address => bool) private minters;
function isMinter(address account) public view returns (bool) {
return minters[account];
}
function mintTo(address to) public onlyMinters returns(uint256 tokenId) {
return _mintTo(to);
}
function mintById(address to, uint256 tokenId) public onlyMinters {
_safeMint(to, tokenId);
}
function mintMany(address[] memory recipients, uint256[] memory tokenCounts) public onlyMinters {
for(uint256 i = 0; i < recipients.length; i++) {
uint256 cnt = tokenCounts[i];
for(uint256 j = 0; j < cnt; j++) {
_mintTo(recipients[i]);
}
}
}
function mintManyByIds(address[] memory recipients, uint256[][] memory tokenIds) public onlyMinters {
for(uint256 i = 0; i < recipients.length; i++) {
uint256 cnt = tokenIds[i].length;
for(uint256 j = 0; j < cnt; j++) {
_safeMint(recipients[i], tokenIds[i][j]);
}
}
}
function setTokenURI(uint256 tokenId, string memory _tokenURI) public onlyMinters {
_setTokenURI(tokenId, _tokenURI);
}
function _setMinter(address account, bool trusted) internal {
minters[account]= trusted;
emit MinterPrivilegesChange(account, trusted);
}
function _setMinters(address[] memory _minters, bool[] memory trusted) internal {
if(_minters.length != trusted.length) {
revert NonMatchingArgumentLengths();
}
for(uint256 i = 0; i < _minters.length; i++) {
minters[_minters[i]] = trusted[i];
emit MinterPrivilegesChange(_minters[i], trusted[i]);
}
}
modifier onlyMinters() {
if(!minters[_msgSender()]) {
revert OnlyAuthorizedMinter();
}
_;
}
}
文件 9 的 31:ERC721Payable.sol
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "./IERC721Payable.sol";
import "./IERC721PayableSpender.sol";
import "./IERC721PayableReceiver.sol";
error NonERC721PayableSpenderImplementer();
error NonERC721PayableReceiverImplementer();
abstract contract ERC721Payable is ERC721, IERC721Payable {
function approveAndCall(address spender, uint256 tokenId) public override virtual {
_approveAndCall(spender, tokenId, new bytes(0));
}
function approveAndCall(address spender, uint256 tokenId, bytes memory data) public override virtual{
_approveAndCall(spender, tokenId, data);
}
function transferFromAndCall(address from, address to, uint256 tokenId) public override virtual {
_transferFromAndCall(from, to, tokenId, new bytes(0));
}
function transferFromAndCall(address from, address to, uint256 tokenId, bytes memory data) public override virtual {
_transferFromAndCall(from, to, tokenId, data);
}
function _approveAndCall(address spender, uint256 tokenId, bytes memory data) private {
approve(spender, tokenId);
bytes4 response = IERC721PayableSpender(spender).onApprovalReceived(_msgSender(), tokenId, data);
if(response != IERC721PayableSpender.onApprovalReceived.selector) {
revert NonERC721PayableSpenderImplementer();
}
}
function _transferFromAndCall(address from, address to, uint256 tokenId, bytes memory data) private {
safeTransferFrom(from, to, tokenId);
bytes4 response = IERC721PayableReceiver(to).onTransferReceived(_msgSender(), from, tokenId, data);
if(response != IERC721PayableReceiver.onTransferReceived.selector) {
revert NonERC721PayableReceiverImplementer();
}
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC721Payable).interfaceId ||
super.supportsInterface(interfaceId);
}
}
文件 10 的 31:ERC721TradableV2.sol
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "../../../../common/meta-transactions/RelayRecipientAndContextMixin.sol";
import "../../../../common/meta-transactions/NativeMetaTransaction.sol";
import "../../payable/ERC721Payable.sol";
abstract contract ERC721TradableV2 is ERC721Payable, ERC721Burnable, RelayRecipientAndContextMixin, NativeMetaTransaction {
event TokenIdCounterChange(uint256 prevCounter, uint256 newCounter);
event BaseTokenURIChange(string prevURI, string newURI);
event TokenURIChange(uint256 indexed tokenId, string prevURI, string newURI);
uint256 public tokenIdCounter;
string public baseTokenURI;
uint256 public totalSupply;
mapping(uint256 => string) public tokenURIs;
constructor(
string memory _name,
string memory _symbol
) ERC721(_name, _symbol) {
tokenIdCounter = 1;
_initializeEIP712(_name);
}
function tokenURI(uint256 tokenId) override public virtual view returns (string memory) {
return bytes(tokenURIs[tokenId]).length != 0
? tokenURIs[tokenId]
: string(abi.encodePacked(baseTokenURI, Strings.toString(tokenId)));
}
function exists(uint256 tokenId) public view returns (bool) {
return _exists(tokenId);
}
function _setTokenIdCounter(uint256 _tokenIdCounter) internal {
emit TokenIdCounterChange(tokenIdCounter, _tokenIdCounter);
tokenIdCounter = _tokenIdCounter;
}
function _setBaseTokenURI(string memory uri) internal {
emit BaseTokenURIChange(baseTokenURI, uri);
baseTokenURI = uri;
}
function _mintTo(address to) internal virtual returns(uint256 tokenId) {
tokenId = tokenIdCounter;
_safeMint(to, tokenId);
tokenIdCounter++;
return tokenId;
}
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
emit TokenURIChange(tokenId, tokenURIs[tokenId], _tokenURI);
tokenURIs[tokenId] = _tokenURI;
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Payable, ERC721)
returns (bool) {
return super.supportsInterface(interfaceId);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
totalSupply++;
} else if (to == address(0)) {
totalSupply--;
}
}
}
文件 11 的 31:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 12 的 31:IERC2981.sol
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
interface IERC2981 is IERC165 {
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
returns (address receiver, uint256 royaltyAmount);
}
文件 13 的 31: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,
bytes calldata data
) external;
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 setApprovalForAll(address operator, bool _approved) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
文件 14 的 31: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);
}
文件 15 的 31:IERC721Payable.sol
pragma solidity ^0.8.9;
interface IERC721Payable {
function approveAndCall(address spender, uint256 tokenId) external;
function approveAndCall(address spender, uint256 tokenId, bytes memory data) external;
function transferFromAndCall(address from, address to, uint256 tokenId) external;
function transferFromAndCall(address from, address to, uint256 tokenId, bytes memory data) external;
}
文件 16 的 31:IERC721PayableReceiver.sol
pragma solidity ^0.8.9;
interface IERC721PayableReceiver {
function onTransferReceived(address operator, address from, uint256 tokenId, bytes memory data) external returns(bytes4);
}
文件 17 的 31:IERC721PayableSpender.sol
pragma solidity ^0.8.9;
interface IERC721PayableSpender {
function onApprovalReceived(address owner, uint256 tokenId, bytes memory data) external returns(bytes4);
}
文件 18 的 31:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 19 的 31:Initializable.sol
pragma solidity ^0.8.9;
contract Initializable {
bool inited = false;
modifier initializer() {
require(!inited, "already inited");
_;
inited = true;
}
}
文件 20 的 31:LibPart.sol
pragma solidity ^0.8.9;
library LibPart {
bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");
struct Part {
address payable account;
uint96 value;
}
function hash(Part memory part) internal pure returns (bytes32) {
return keccak256(abi.encode(TYPE_HASH, part.account, part.value));
}
}
文件 21 的 31:LibRoyaltiesV2.sol
pragma solidity ^0.8.9;
library LibRoyaltiesV2 {
bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;
}
文件 22 的 31:ModdableMojoERC721.sol
pragma solidity ^0.8.9;
import "./base/mojoV2/PlanetMojoERC721BaseV2.sol";
contract ModdableMojoERC721 is PlanetMojoERC721BaseV2 {
constructor(
address _owner,
string memory _name,
string memory _symbol,
string memory _baseUri,
address _tokenUriProvider
)
PlanetMojoERC721BaseV2(_owner, _name, _symbol, _baseUri, _tokenUriProvider) {
}
}
文件 23 的 31:NativeMetaTransaction.sol
pragma solidity ^0.8.9;
import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol";
import {EIP712Base} from "./EIP712Base.sol";
contract NativeMetaTransaction is EIP712Base {
using SafeMath for uint256;
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) nonces;
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
MetaTransaction memory metaTx = MetaTransaction({
nonce: nonces[userAddress],
from: userAddress,
functionSignature: functionSignature
});
require(
verify(userAddress, metaTx, sigR, sigS, sigV),
"Signer and signature do not match"
);
nonces[userAddress] = nonces[userAddress].add(1);
emit MetaTransactionExecuted(
userAddress,
payable(msg.sender),
functionSignature
);
(bool success, bytes memory returnData) = address(this).call(
abi.encodePacked(functionSignature, userAddress)
);
require(success, "Function call not successful");
return returnData;
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encode(
META_TRANSACTION_TYPEHASH,
metaTx.nonce,
metaTx.from,
keccak256(metaTx.functionSignature)
)
);
}
function getNonce(address user) public view returns (uint256 nonce) {
nonce = nonces[user];
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
return
signer ==
ecrecover(
toTypedMessageHash(hashMetaTransaction(metaTx)),
sigV,
sigR,
sigS
);
}
}
文件 24 的 31:Ownable.sol
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
abstract contract Ownable is Context, IERC165 {
bytes4 private constant INTERFACE_ID_ERC173 = 0x7f5828d0;
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor(address initialOwner) {
_transferOwnership(initialOwner);
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() virtual {
if (owner() != _msgSender()) {
revertOwnable();
}
_;
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override
returns (bool)
{
return interfaceId == INTERFACE_ID_ERC173;
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
function revertOwnable() internal pure {
revert("Ownable: caller is not the owner");
}
}
文件 25 的 31:OwnableWithTempOwnership.sol
pragma solidity ^0.8.9;
import "./Ownable.sol";
error OnlRootOwnerCanRevoke();
abstract contract OwnableWithTempOwnership is Ownable {
event TempOwnerSet(address indexed tempOwner);
event TempOwnerRevoked(address indexed tempOwner);
event RootOwnerChange(address indexed rootOwner);
address public rootOwner;
constructor(address _owner) Ownable(_owner) {}
function setTempOwner(address account) public onlyOwner {
if (rootOwner == address(0)) {
_setRootOwner(owner());
}
super.transferOwnership(account);
emit TempOwnerSet(account);
}
function revokeTempOwner() public {
if (rootOwner != _msgSender()) {
revert OnlRootOwnerCanRevoke();
}
emit TempOwnerRevoked(owner());
super.transferOwnership(rootOwner);
_setRootOwner(address(0));
}
function tempOwner() public view returns (address) {
return rootOwner != address(0) ? owner() : address(0);
}
function transferOwnership(address newOwner) public override onlyOwner {
super.transferOwnership(newOwner);
_setRootOwner(address(0));
}
function renounceOwnership() public override onlyOwner {
_transferOwnership(address(0));
_setRootOwner(address(0));
}
modifier onlyOwner() override {
address sender = _msgSender();
if (rootOwner != address(0)) {
if (rootOwner != sender) {
revertOwnable();
}
} else {
if (owner() != sender) {
revertOwnable();
}
}
_;
}
function _setRootOwner(address newRootOwner) private {
if (rootOwner != newRootOwner) {
rootOwner = newRootOwner;
emit RootOwnerChange(newRootOwner);
}
}
}
文件 26 的 31:PlanetMojoERC721BaseV2.sol
pragma solidity ^0.8.13;
import "./ERC721MintManagementV2.sol";
import "../../../../royalties/CustomRoyalties.sol";
import "../../../../access/OwnableWithTempOwnership.sol";
import "../../../../common/meta-transactions/RelayRecipientAndContextMixin.sol";
interface ITokenUriProvider {
function tokenURI(uint256 tokenId) external view returns(string memory);
}
abstract contract PlanetMojoERC721BaseV2 is ERC721MintManagementV2, CustomRoyalties, OwnableWithTempOwnership {
address public tokenUriProvider;
constructor(
address _owner,
string memory _name,
string memory _symbol,
string memory _baseURI,
address _tokenUriProvider
) ERC721TradableV2(_name, _symbol)
OwnableWithTempOwnership(_owner) {
tokenUriProvider = _tokenUriProvider;
_setBaseTokenURI(_baseURI);
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
if (tokenUriProvider != address(0)) {
return ITokenUriProvider(tokenUriProvider).tokenURI(tokenId);
} else {
return super.tokenURI(tokenId);
}
}
function setTokenUriProvider(address _tokenUriProvider) public onlyOwner {
tokenUriProvider = _tokenUriProvider;
}
function setBaseTokenURI(string memory uri) public onlyOwner {
_setBaseTokenURI(uri);
}
function setMinter(address account, bool trusted) public onlyOwner {
_setMinter(account, trusted);
}
function setMinters(address[] memory _minters, bool[] memory trusted) public onlyOwner {
_setMinters(_minters, trusted);
}
function setTokenIdCounter(uint256 _tokenIdCounter) public onlyOwner {
_setTokenIdCounter(_tokenIdCounter);
}
function setTrustedForwarder(address forwarder, bool trusted) public onlyOwner {
_setTrustedForwarder(forwarder, trusted);
}
function setRoyaltiesForAll(address payable recipientAddress, uint96 percentageBasisPoints) public onlyOwner {
_setRoyaltiesForAll(recipientAddress, percentageBasisPoints);
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721TradableV2, Ownable, CustomRoyalties) returns (bool) {
return ERC721TradableV2.supportsInterface(interfaceId) ||
Ownable.supportsInterface(interfaceId) ||
CustomRoyalties.supportsInterface(interfaceId);
}
function _msgSender()
internal
override
view
returns (address sender)
{
return RelayRecipientAndContextMixin.msgSender();
}
}
文件 27 的 31:RelayRecipient.sol
pragma solidity ^0.8.9;
abstract contract RelayRecipient {
event TrustedForwarderSet(address indexed forwarder, bool trusted);
mapping(address => bool) public trustedForwarders;
function isTrustedForwarder(address forwarder) public view returns(bool) {
return trustedForwarders[forwarder];
}
function _setTrustedForwarder(address forwarder, bool trusted) internal {
trustedForwarders[forwarder] = trusted;
emit TrustedForwarderSet(forwarder, trusted);
}
}
文件 28 的 31:RelayRecipientAndContextMixin.sol
pragma solidity ^0.8.9;
import "./RelayRecipient.sol";
abstract contract RelayRecipientAndContextMixin is RelayRecipient {
function msgSender()
internal
view
returns (address payable sender)
{
if (isTrustedForwarder(msg.sender)) {
assembly {
sender := shr(96,calldataload(sub(calldatasize(),20)))
}
} else if (msg.sender == address(this)) {
bytes memory array = msg.data;
uint256 index = msg.data.length;
assembly {
sender := and(
mload(add(array, index)),
0xffffffffffffffffffffffffffffffffffffffff
)
}
} else {
sender = payable(msg.sender);
}
return sender;
}
}
文件 29 的 31:RoyaltiesV2.sol
pragma solidity ^0.8.9;
import "./LibPart.sol";
interface RoyaltiesV2 {
function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);
}
文件 30 的 31:SafeMath.sol
pragma solidity ^0.8.0;
library SafeMath {
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);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
文件 31 的 31: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/token/erc721/ModdableMojoERC721.sol": "ModdableMojoERC721"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 100000
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"address","name":"_tokenUriProvider","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NonERC721PayableReceiverImplementer","type":"error"},{"inputs":[],"name":"NonERC721PayableSpenderImplementer","type":"error"},{"inputs":[],"name":"NonMatchingArgumentLengths","type":"error"},{"inputs":[],"name":"OnlRootOwnerCanRevoke","type":"error"},{"inputs":[],"name":"OnlyAuthorizedMinter","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":false,"internalType":"string","name":"prevURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"BaseTokenURIChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"trusted","type":"bool"}],"name":"MinterPrivilegesChange","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":"rootOwner","type":"address"}],"name":"RootOwnerChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"prevRoyalties","type":"uint256"},{"indexed":false,"internalType":"address","name":"newRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRoyalties","type":"uint256"}],"name":"RoyaltiesForAllSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tempOwner","type":"address"}],"name":"TempOwnerRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tempOwner","type":"address"}],"name":"TempOwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevCounter","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCounter","type":"uint256"}],"name":"TokenIdCounterChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"prevURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"TokenURIChange","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"forwarder","type":"address"},{"indexed":false,"internalType":"bool","name":"trusted","type":"bool"}],"name":"TrustedForwarderSet","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approveAndCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"approveAndCall","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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getRaribleV2Royalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintById","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"tokenCounts","type":"uint256[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[][]","name":"tokenIds","type":"uint256[][]"}],"name":"mintManyByIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintTo","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeTempOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rootOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercentageBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyRecipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"trusted","type":"bool"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_minters","type":"address[]"},{"internalType":"bool[]","name":"trusted","type":"bool[]"}],"name":"setMinters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipientAddress","type":"address"},{"internalType":"uint96","name":"percentageBasisPoints","type":"uint96"}],"name":"setRoyaltiesForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"setTempOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenIdCounter","type":"uint256"}],"name":"setTokenIdCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenUriProvider","type":"address"}],"name":"setTokenUriProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"},{"internalType":"bool","name":"trusted","type":"bool"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tempOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIdCounter","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":"uint256","name":"","type":"uint256"}],"name":"tokenURIs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenUriProvider","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferFromAndCall","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":"transferFromAndCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"trustedForwarders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]