Rise In Logo



Learn everything about Chiliz

Implementing Frontend IV - Getting Token Metadata

In the videos we are showing the conventional way yet in case you face problems with EvmApi, it is due to incompleteness of CHZ integration in Moralis.

You can check this link for metadata.

For fetching token_metadatas you can use the following code instead:

const baseUrl = `https://deep-index.moralis.io/api/v2.2/erc20/metadata?chain=${current_chain}`;

let fullUrl = baseUrl;
token_address_list.forEach((address, index) => {
 const addressParam = `&addresses%5B${index}%5D=${address}`;
 fullUrl += addressParam;
});

const response = await fetch(fullUrl, {
 method: 'GET',
 headers: {
  Accept: 'application/json',
  'X-API-Key': apiKey,
 },
});
const data = await response.json();
setTokens(data);

Comments

You need to enroll in the course to be able to comment!

Stay in the know

Never miss updates on new programs and opportunities.

Rise In Logo

Rise together in web3!

Disclaimer: The information /programs / events provided on https://patika.dev and https://risein.com are strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice and do not make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://patika.dev and https://risein.com disclaim any responsibility for financial decisions made by users based on information provided here.