How to get the balance of a wallet
What is the CHZ balance of a wallet?
How to do it with Moralis
import Moralis from "moralis";
const runApp = async() => {
await Moralis.start({
apiKey: "YOUR_API_KEY",
// ...and any other configuration
});
const address = "0xYourWalletAddress";
const chain = "0x15b38", // This is for Chiliz Chain Mainnet.
// For Spicy Testnet, use "0x15b32".
const response = await Moralis.EvmApi.balance.getNativeBalance({
address,
chain,
});
console.log(response.toJSON());
};
runApp();How to do it with Tatum
How to do it with thirdweb
How to do it using Nodit
Last updated
Was this helpful?