Hi,
I'm getting a json correctly with my scripting code, but I need to pass it to the JSON C3 plugin, to use it on the event sheet, how can I do it? What I'm trying atm:
async function GetMetadata(runtime) {
const url = "https://api.helius.xyz/v0/token-metadata?api-key=REDACTED";
const nftAddresses = [
"BAAzgRGWY2v5AJBNZNFd2abiRXAUo56UxywKEjoCZW2",
"8s6kQUZfdm7GSaThAcsmSs56wMinXrbk6SdNVngutrz5"
]; // Monkes
const getMetadata = async () => {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
mintAccounts: nftAddresses,
includeOffChain: true,
disableCache: false,
}),
});
const data = await response.json();
console.log("metadata: ", data);
runtime.callFunction("GetJ",data);
};
getMetadata();
}