getContractBalance
view
Use this function in your app
const response = await fetch('https://api.thirdweb.com/v1/contracts/read', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-secret-key': '<YOUR_SECRET_KEY>'
},
body: JSON.stringify({
calls: [
{
contractAddress: "0xF3eBc32292F4BbFB83DECB97Eb42d95da968f775",
method: "function getContractBalance() view returns (uint256)",
params: []
}
],
chainId: 245022926
})
});
const data = await response.json();