Hi all!
I’m trying to work with web3 in a cloud function. I’m aware that I can do things like:
const web3 = Moralis.web3ByChain("0x38"); // BSC
const abi = Moralis.Web3.abis.erc20;
const address = "0x...."
// create contract instance
const contract = new web3.eth.Contract(abi, address);
// get contract name
const name = await contract.methods
.name()
.call()
.catch(() => "");
In the cloud function, but I’m wondering if I can do something like:
Moralis.Cloud.define("updateNFTImages", async (request) => {
await Moralis.Web3API.token.getERC721Metadata({ address, chain }))
So far, I’m getting an error saying it doesn’t recognize token
so I’m assuming at the moment this functionality doesn’t exist.