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