balanceOf
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: "0xDCb313BC098b5b2A315EcAC5c3f3eAa6ddCd34E4",
method: "function balanceOf(address account, uint256 id) view returns (uint256)",
params: [account, id]
}
],
chainId: 660279
})
});
const data = await response.json();