Aller directement au contenu principal

eth_getBalance RPC Method

Chargement en cours...

Mis à jour le
15 juin 2026

eth_getBalance RPC Method

▾ How to check TIP-20 token balances

Since Tempo does not have a native token, you need to query TIP-20 stablecoin contracts directly to check account balances. Use the balanceOf function on the token contract.

Example using ethers.js:

const ethers = require('ethers');
const NODE_URL = "YOUR_QUICKNODE_ENDPOINT";
const provider = new ethers.JsonRpcProvider(NODE_URL);

// pathUSD token contract address
const PATHUSD_ADDRESS = "0x20c0000000000000000000000000000000000000";

async function checkTokenBalance(address) {
const abi = ["function balanceOf(address) view returns (uint256)"];
const tokenContract = new ethers.Contract(PATHUSD_ADDRESS, abi, provider);
const balance = await tokenContract.balanceOf(address);

// TIP-20 tokens use 6 decimal places
const formattedBalance = ethers.formatUnits(balance, 6);
console.log(`pathUSD balance: ${formattedBalance}`);
}

checkTokenBalance("0x9729187D9E8Bbefa8295F39f5634cA454dd9d294");

Available TIP-20 stablecoins:

TokenAdresse
pathUSD0x20c0000000000000000000000000000000000000
AlphaUSD0x20c0000000000000000000000000000000000001
BetaUSD0x20c0000000000000000000000000000000000002
ThetaUSD0x20c0000000000000000000000000000000000003

Paramètres

adresse
chaîne de caractères
OBLIGATOIRE
Chargement en cours...
numéro de bloc
chaîne de caractères
OBLIGATOIRE
Chargement en cours...

Retours

résultat
chaîne de caractères
Chargement en cours...
Demande
Réponse
1
{
2
« jsonrpc »: « 2.0 »,
3
« id »: 1,
4
"result": "0x9612084f0316e0ebd5182f398e5195a51b5ca47667d4c9b26c9b26c9b26c9b2"
5
}
1
{
2
« jsonrpc »: « 2.0 »,
3
« id »: 1,
4
"result": "0x9612084f0316e0ebd5182f398e5195a51b5ca47667d4c9b26c9b26c9b26c9b2"
5
}
Vous n'avez pas encore de compte ?
Créez votreendpoint Quicknode endpoint quelques secondes et commencez à développer
Commencez gratuitement