Cloud functions in BSC Testnet could not load tokenURI… please help.
during the trigger process (when sync function called to blockchain event)
I need to store the data about the NFT and try to get the NFT data…
I’m trying different approaches:
- await Moralis.Web3API.native.runContractFunction({
chain: “0x61”,
address: “0xA798E8109Ba8D1382bc875964F92D54c7d2608da”,
function_name: “tokenURI”,
abi: Moralis.Web3.abis.erc721,
params: {tokenId: 3}
});
- returns undentified (previously in prod mode is was working fine)
- await Moralis.Cloud.httpRequest({
method: ‘GET’,
url:https://deep-index.moralis.io/api/v2/nft/0xA798E8109Ba8D1382bc875964F92D54c7d2608da/3
,
params: {
chain: “0x61”,
format: ‘decimal’,
normalizeMetadata: ‘true’
},
headers: {
accept: ‘application/json’,
‘X-API-Key’: ‘…’
}
});
- breaks in the cloud-code somehow and response - undentified…
PLEASE ))) What is the working way of getting tokenURI for NFT from CloudCode
I don’t want to rewrite all the project using new tech stack any time Moralis upgrades
If I execute 2nd function in job - it works fine… but when I call that code in trigger (on sync) method - it returns undefined