Hello everyone! I’m using the fetchNFTs
API, and I’ve run into an issue when retrieving details for NFTs from certain 1155 contracts.
For example, for the contract “0x23a8c2ce858b2e66222567923641cb6417994caf” the API response includes all the NFT details like name, description, and image, which is what I expected.
javascript
import { Core } from ‘@quicknode/sdk’
import * as dotenv from “dotenv”;
dotenv.config()
const rpc = process.env.RPC_MAINNET;
const core = new Core({
endpointUrl: rpc,
config: {
addOns: {
nftTokenV2: true,
},
},
})
core.client
.qn_fetchNFTs({
wallet: “0x9546b9EcC274cce3C6c345622771E0be983e3B90”,
contracts: [
“0x23a8c2ce858b2e66222567923641cb6417994caf”
],
perPage: 10,
page: 1
})
.then(res => console.log(res))
However, for the contract “0x8b7855f52df16aef1a5f64b7016cea7b01ce876b” the NFT details such as name, description, and image are empty.
I’ve checked the “uri” parameter for each token, and it seems to be configured correctly, so I’m ruling that out as the issue.
javascript
import { Core } from ‘@quicknode/sdk’
import * as dotenv from “dotenv”;
dotenv.config()
const rpc = process.env.RPC_MAINNET;
const core = new Core({
endpointUrl: rpc,
config: {
addOns: {
nftTokenV2: true,
},
},
})
core.client
.qn_fetchNFTs({
wallet: “0x1C0B95c97aC9580395d2F26a40322512F9b439dF”,
contracts: [
“0x8b7855f52df16aef1a5f64b7016cea7b01ce876b”
],
perPage: 10,
page: 1
})
.then(res => console.log(res))
Also when I call fetchNFTsByCollection
const core = new Core({
endpointUrl: rpc,
config: {
addOns: {
nftTokenV2: true,
},
},
})
core.client
.qn_fetchNFTsByCollection({
collection: “0x8b7855f52df16aef1a5f64b7016cea7b01ce876b”,
tokens: [‘1’, ‘100’]
})
.then(res => console.log(res))
core.client
.qn_fetchNFTsByCollection({
collection: “0x23a8c2ce858b2e66222567923641cb6417994caf”,
tokens: [‘1’, ‘2’]
})
.then(res => console.log(res))
response:
{
collection: ‘0x8b7855f52df16aef1a5f64b7016cea7b01ce876b’,
tokens: [
{
collectionName: ‘Dapps Factory Collection’,
collectionAddress: ‘0x8b7855f52df16aef1a5f64b7016cea7b01ce876b’,
collectionTokenId: ‘1’,
description: ‘’,
name: ‘’,
imageUrl: ‘’,
traits: ,
chain: ‘POLYGON’,
network: ‘MATIC’
},
{
collectionName: ‘Dapps Factory Collection’,
collectionAddress: ‘0x8b7855f52df16aef1a5f64b7016cea7b01ce876b’,
collectionTokenId: ‘100’,
description: ‘’,
name: ‘’,
imageUrl: ‘’,
traits: ,
chain: ‘POLYGON’,
network: ‘MATIC’
}
],
totalPages: 1,
pageNumber: 1,
totalItems: 2
}
{
collection: ‘0x23a8c2ce858b2e66222567923641cb6417994caf’,
tokens: [
{
collectionName: ‘The High Apes Club - World Pass’,
collectionAddress: ‘0x23a8c2ce858b2e66222567923641cb6417994caf’,
collectionTokenId: ‘1’,
description: ‘(NOTE: This is only a promotional NFT of our collection to be minted in March)\n’ +
‘\n’ +
‘We are going to create a World Record in the NFT space by airdropping our promo to 1 Million Wallets!\n’ +
‘\n’ +
‘The High Apes Club - Minting on March 2022.\n’ +
‘\n’ +
‘Our Website: https://www.thehighapesclub.com\n’ +
‘\n’ +
‘Discord: Discord’ +
‘\n’ +
‘Twitter: https://www.twitter.com/thehighapesclub\n’ +
‘\n’ +
‘Instagram: https://www.instagram.com/thehighapesclub\n’ +
‘\n’ +
‘Join our Discord for latest updates.’,
name: ‘THC World Pass’,
imageUrl: ‘The domain name thehighapesclub.com is for sale’,
traits: [Array],
chain: ‘POLYGON’,
network: ‘MATIC’
},
{
collectionName: ‘The High Apes Club - World Pass’,
collectionAddress: ‘0x23a8c2ce858b2e66222567923641cb6417994caf’,
collectionTokenId: ‘2’,
description: ‘’,
name: ‘’,
imageUrl: ‘’,
traits: ,
chain: ‘POLYGON’,
network: ‘MATIC’
}
],
totalPages: 1,
pageNumber: 1,
totalItems: 2
}
Only one of the items has the complete response. Whats the issue whit the 1155?
The main question is: Why does the fetchNFTs
API not provide NFT details, such as name, description, and image, for NFTs from certain 1155 contracts, like the “0x8b7855f52df16aef1a5f64b7016cea7b01ce876b” contract, despite the “uri” parameter appearing to be correctly configured? I would appreciate any help in resolving this issue. Thank you!