Web3 NFT Shop Forum

So in player’s inventory you can see the items right? It’s just in opensea that they don’t appear?

Sometimes Testnets Opensea fails to get metadata or at least takes a while to do so. Are you using the same contract provided in the project? I would try deploying a new fresh contract and see what happens :slight_smile:

They do appear in the inventory but not on opensea.

I used the contract provided, and tried with my own.

Thank you very much for your quick reply, I want to say that your content is one of the best existing in the world today, and sincerely thank you :pray:t3:

1 Like

Yes It does show on open sea now !! Thank you !!

1 Like

Thank you very much. Your words are truly appreciated :pray:

Hey! How did you manage to do this?

How could we add utility/unlockable content to our NFT?

Hi there,
You can get the ImageURL from the data base with the GetItemsFromDB method, then a for loop to assign textures to an array of materials, and assign each material to 3d object :slight_smile:

1 Like

HI @dpradell, how to set a price for nft minting ?
I have this smart contract where I can setup a price for minting. When price is 0, the minting function works perfectly.
When I set my price to a different amount, It fails at polygonscan level but no error in unity log:


when metamask asks to sign the transaction, the amount displayed is always zero.
it works well on remix.

Any advice would be much appreciated :slight_smile:

The error is Fail with error 'insufficient funds' so you need to look here. Have you changed the value to pay in your transaction? You can post your contract and transaction code.

@dpradell How can we add ‘animation_url’ metadata into this project to enable 3d/gltf versions on opensea?

You will need to add this to the metadata object used for the token URIs.

Relevant part of the tutorial

You should be able to edit these functions to include an animation_url property (it looks like you will have to add this column to your server Class):

unity-web3-sample-nft-shop/MoralisTools.cs at main · MoralisWeb3/unity-web3-sample-nft-shop (github.com)

unity-web3-sample-nft-shop/PurchaseItemManager.cs at main · MoralisWeb3/unity-web3-sample-nft-shop (github.com)

Hi @metabae,

We will be adding and using some attributes to NFTs in my next Moralis Project :slight_smile:

Referring to NFT Shop one, I just updated it to 1.2.2 SDK version:

And @Hero909, I’ll be looking into adding prices to the Shop items in a future tutorial soon, so that might cover your issue.

Cheers!

1 Like

Hi there!

When I was trying to buy an item I caught this error:

Call to buyItem failed due to: Invalid ABI, could not be parsed

I used this NFTShop.sol data:

Code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

//Importing ERC 1155 Token contract from OpenZeppelin
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol";


contract NftShop is ERC1155 , Ownable  {
    
    string public name = "Unity NFT Shop 2";

    mapping(uint256 => string) tokenUrls;
    
    constructor() ERC1155("")  {}

    function buyItem(uint256 tokenId, string memory tokenUrl, bytes memory data) public /*onlyOwner*/{
        
        //IMPORTANT Implement own security (set ownership to users). Not production ready contract
        
        tokenUrls[tokenId] = tokenUrl;
        _mint(msg.sender, tokenId, 1, data);
    }
    
    function uri(uint256 id) public view virtual override returns (string memory) {
        return tokenUrls[id];
    }
}
ABI
[
	{
		"inputs": [],
		"stateMutability": "nonpayable",
		"type": "constructor"
	},
	{
		"anonymous": false,
		"inputs": [
			{
				"indexed": true,
				"internalType": "address",
				"name": "account",
				"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": "operator",
				"type": "address"
			},
			{
				"indexed": true,
				"internalType": "address",
				"name": "from",
				"type": "address"
			},
			{
				"indexed": true,
				"internalType": "address",
				"name": "to",
				"type": "address"
			},
			{
				"indexed": false,
				"internalType": "uint256[]",
				"name": "ids",
				"type": "uint256[]"
			},
			{
				"indexed": false,
				"internalType": "uint256[]",
				"name": "values",
				"type": "uint256[]"
			}
		],
		"name": "TransferBatch",
		"type": "event"
	},
	{
		"anonymous": false,
		"inputs": [
			{
				"indexed": true,
				"internalType": "address",
				"name": "operator",
				"type": "address"
			},
			{
				"indexed": true,
				"internalType": "address",
				"name": "from",
				"type": "address"
			},
			{
				"indexed": true,
				"internalType": "address",
				"name": "to",
				"type": "address"
			},
			{
				"indexed": false,
				"internalType": "uint256",
				"name": "id",
				"type": "uint256"
			},
			{
				"indexed": false,
				"internalType": "uint256",
				"name": "value",
				"type": "uint256"
			}
		],
		"name": "TransferSingle",
		"type": "event"
	},
	{
		"anonymous": false,
		"inputs": [
			{
				"indexed": false,
				"internalType": "string",
				"name": "value",
				"type": "string"
			},
			{
				"indexed": true,
				"internalType": "uint256",
				"name": "id",
				"type": "uint256"
			}
		],
		"name": "URI",
		"type": "event"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "account",
				"type": "address"
			},
			{
				"internalType": "uint256",
				"name": "id",
				"type": "uint256"
			}
		],
		"name": "balanceOf",
		"outputs": [
			{
				"internalType": "uint256",
				"name": "",
				"type": "uint256"
			}
		],
		"stateMutability": "view",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address[]",
				"name": "accounts",
				"type": "address[]"
			},
			{
				"internalType": "uint256[]",
				"name": "ids",
				"type": "uint256[]"
			}
		],
		"name": "balanceOfBatch",
		"outputs": [
			{
				"internalType": "uint256[]",
				"name": "",
				"type": "uint256[]"
			}
		],
		"stateMutability": "view",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "uint256",
				"name": "tokenId",
				"type": "uint256"
			},
			{
				"internalType": "string",
				"name": "tokenUrl",
				"type": "string"
			},
			{
				"internalType": "bytes",
				"name": "data",
				"type": "bytes"
			}
		],
		"name": "buyItem",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "account",
				"type": "address"
			},
			{
				"internalType": "address",
				"name": "operator",
				"type": "address"
			}
		],
		"name": "isApprovedForAll",
		"outputs": [
			{
				"internalType": "bool",
				"name": "",
				"type": "bool"
			}
		],
		"stateMutability": "view",
		"type": "function"
	},
	{
		"inputs": [],
		"name": "name",
		"outputs": [
			{
				"internalType": "string",
				"name": "",
				"type": "string"
			}
		],
		"stateMutability": "view",
		"type": "function"
	},
	{
		"inputs": [],
		"name": "owner",
		"outputs": [
			{
				"internalType": "address",
				"name": "",
				"type": "address"
			}
		],
		"stateMutability": "view",
		"type": "function"
	},
	{
		"inputs": [],
		"name": "renounceOwnership",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "from",
				"type": "address"
			},
			{
				"internalType": "address",
				"name": "to",
				"type": "address"
			},
			{
				"internalType": "uint256[]",
				"name": "ids",
				"type": "uint256[]"
			},
			{
				"internalType": "uint256[]",
				"name": "amounts",
				"type": "uint256[]"
			},
			{
				"internalType": "bytes",
				"name": "data",
				"type": "bytes"
			}
		],
		"name": "safeBatchTransferFrom",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "from",
				"type": "address"
			},
			{
				"internalType": "address",
				"name": "to",
				"type": "address"
			},
			{
				"internalType": "uint256",
				"name": "id",
				"type": "uint256"
			},
			{
				"internalType": "uint256",
				"name": "amount",
				"type": "uint256"
			},
			{
				"internalType": "bytes",
				"name": "data",
				"type": "bytes"
			}
		],
		"name": "safeTransferFrom",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "operator",
				"type": "address"
			},
			{
				"internalType": "bool",
				"name": "approved",
				"type": "bool"
			}
		],
		"name": "setApprovalForAll",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "bytes4",
				"name": "interfaceId",
				"type": "bytes4"
			}
		],
		"name": "supportsInterface",
		"outputs": [
			{
				"internalType": "bool",
				"name": "",
				"type": "bool"
			}
		],
		"stateMutability": "view",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "address",
				"name": "newOwner",
				"type": "address"
			}
		],
		"name": "transferOwnership",
		"outputs": [],
		"stateMutability": "nonpayable",
		"type": "function"
	},
	{
		"inputs": [
			{
				"internalType": "uint256",
				"name": "id",
				"type": "uint256"
			}
		],
		"name": "uri",
		"outputs": [
			{
				"internalType": "string",
				"name": "",
				"type": "string"
			}
		],
		"stateMutability": "view",
		"type": "function"
	}
]
Minify/Compact ABI (one line string)
[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"tokenUrl\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"buyItem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]

[{\“inputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“constructor\”},{\“anonymous\”:false,\“inputs\”:[{\“indexed\”:true,\“internalType\”:\“address\”,\“name\”:\“account\”,\“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\”:\“operator\”,\“type\”:\“address\”},{\“indexed\”:true,\“internalType\”:\“address\”,\“name\”:\“from\”,\“type\”:\“address\”},{\“indexed\”:true,\“internalType\”:\“address\”,\“name\”:\“to\”,\“type\”:\“address\”},{\“indexed\”:false,\“internalType\”:\“uint256[]\”,\“name\”:\“ids\”,\“type\”:\“uint256[]\”},{\“indexed\”:false,\“internalType\”:\“uint256[]\”,\“name\”:\“values\”,\“type\”:\“uint256[]\”}],\“name\”:\“TransferBatch\”,\“type\”:\“event\”},{\“anonymous\”:false,\“inputs\”:[{\“indexed\”:true,\“internalType\”:\“address\”,\“name\”:\“operator\”,\“type\”:\“address\”},{\“indexed\”:true,\“internalType\”:\“address\”,\“name\”:\“from\”,\“type\”:\“address\”},{\“indexed\”:true,\“internalType\”:\“address\”,\“name\”:\“to\”,\“type\”:\“address\”},{\“indexed\”:false,\“internalType\”:\“uint256\”,\“name\”:\“id\”,\“type\”:\“uint256\”},{\“indexed\”:false,\“internalType\”:\“uint256\”,\“name\”:\“value\”,\“type\”:\“uint256\”}],\“name\”:\“TransferSingle\”,\“type\”:\“event\”},{\“anonymous\”:false,\“inputs\”:[{\“indexed\”:false,\“internalType\”:\“string\”,\“name\”:\“value\”,\“type\”:\“string\”},{\“indexed\”:true,\“internalType\”:\“uint256\”,\“name\”:\“id\”,\“type\”:\“uint256\”}],\“name\”:\“URI\”,\“type\”:\“event\”},{\“inputs\”:[{\“internalType\”:\“address\”,\“name\”:\“account\”,\“type\”:\“address\”},{\“internalType\”:\“uint256\”,\“name\”:\“id\”,\“type\”:\“uint256\”}],\“name\”:\“balanceOf\”,\“outputs\”:[{\“internalType\”:\“uint256\”,\“name\”:\"\",\“type\”:\“uint256\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“address[]\”,\“name\”:\“accounts\”,\“type\”:\“address[]\”},{\“internalType\”:\“uint256[]\”,\“name\”:\“ids\”,\“type\”:\“uint256[]\”}],\“name\”:\“balanceOfBatch\”,\“outputs\”:[{\“internalType\”:\“uint256[]\”,\“name\”:\"\",\“type\”:\“uint256[]\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“uint256\”,\“name\”:\“tokenId\”,\“type\”:\“uint256\”},{\“internalType\”:\“string\”,\“name\”:\“tokenUrl\”,\“type\”:\“string\”},{\“internalType\”:\“bytes\”,\“name\”:\“data\”,\“type\”:\“bytes\”}],\“name\”:\“buyItem\”,\“outputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“address\”,\“name\”:\“account\”,\“type\”:\“address\”},{\“internalType\”:\“address\”,\“name\”:\“operator\”,\“type\”:\“address\”}],\“name\”:\“isApprovedForAll\”,\“outputs\”:[{\“internalType\”:\“bool\”,\“name\”:\"\",\“type\”:\“bool\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”},{\“inputs\”:[],\“name\”:\“name\”,\“outputs\”:[{\“internalType\”:\“string\”,\“name\”:\"\",\“type\”:\“string\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”},{\“inputs\”:[],\“name\”:\“owner\”,\“outputs\”:[{\“internalType\”:\“address\”,\“name\”:\"\",\“type\”:\“address\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”},{\“inputs\”:[],\“name\”:\“renounceOwnership\”,\“outputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“address\”,\“name\”:\“from\”,\“type\”:\“address\”},{\“internalType\”:\“address\”,\“name\”:\“to\”,\“type\”:\“address\”},{\“internalType\”:\“uint256[]\”,\“name\”:\“ids\”,\“type\”:\“uint256[]\”},{\“internalType\”:\“uint256[]\”,\“name\”:\“amounts\”,\“type\”:\“uint256[]\”},{\“internalType\”:\“bytes\”,\“name\”:\“data\”,\“type\”:\“bytes\”}],\“name\”:\“safeBatchTransferFrom\”,\“outputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“address\”,\“name\”:\“from\”,\“type\”:\“address\”},{\“internalType\”:\“address\”,\“name\”:\“to\”,\“type\”:\“address\”},{\“internalType\”:\“uint256\”,\“name\”:\“id\”,\“type\”:\“uint256\”},{\“internalType\”:\“uint256\”,\“name\”:\“amount\”,\“type\”:\“uint256\”},{\“internalType\”:\“bytes\”,\“name\”:\“data\”,\“type\”:\“bytes\”}],\“name\”:\“safeTransferFrom\”,\“outputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“address\”,\“name\”:\“operator\”,\“type\”:\“address\”},{\“internalType\”:\“bool\”,\“name\”:\“approved\”,\“type\”:\“bool\”}],\“name\”:\“setApprovalForAll\”,\“outputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“bytes4\”,\“name\”:\“interfaceId\”,\“type\”:\“bytes4\”}],\“name\”:\“supportsInterface\”,\“outputs\”:[{\“internalType\”:\“bool\”,\“name\”:\"\",\“type\”:\“bool\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“address\”,\“name\”:\“newOwner\”,\“type\”:\“address\”}],\“name\”:\“transferOwnership\”,\“outputs\”:[],\“stateMutability\”:\“nonpayable\”,\“type\”:\“function\”},{\“inputs\”:[{\“internalType\”:\“uint256\”,\“name\”:\“id\”,\“type\”:\“uint256\”}],\“name\”:\“uri\”,\“outputs\”:[{\“internalType\”:\“string\”,\“name\”:\"\",\“type\”:\“string\”}],\“stateMutability\”:\“view\”,\“type\”:\“function\”}]

What’s wrong with ABI? Any ideas?

Thanks in advance.

Hi @Andrey,

If you follow the tutorial you’ll see that you’re missing one step which is replacing the quotes:

Hi @dpradell,
Are you talking about this step?

Exactly, that’s what you need

Unfortunately, this step has already been taken…

1 Like

I see. Sorry, my bad.

If you’re doing this on Remix, after compiling the contract, when copying the ABI make sure it is selected in the dropdown. Sometimes other contracts are automatically selected, and you’re copying the wrong ABI:

Yes, I know. The correct contract is selected on Remix. And I compared the number of characters after replacing the quotes with what’s in the video and they match! :grin:

I also checked if I am sending another ABI. But in the place where the error is called, the ABI comes identical to what it copied from jsonformatter.org

P.S. Correct me if I’m wrong, but if you copy the wrong ABI on Remix, it should also could be parsed and just write that the function I needed was not found. Isn’t that right?