ethers.js
. Developers can often reuse ethers-based approaches with the right configurations.
If direct on-chain queries are difficult, we’ll also explore how to fall back to peaq.subscan.io
, a web-based explorer that allows you to look up balances via an HTTPS GUI.
ethers.js
installed and know how to initialize a provider.node
and npm
installed, then run:
checkBalance.js
), import ethers and instantiate a provider. Point it to the RPC endpoint of the peaq network you’re connecting to (this might be a testnet or mainnet endpoint—adjust accordingly):
getBalance
method, passing in the wallet address. The address should be an Ethereum-compatible format (e.g., 0x…):
ethers.js
or via peaq.subscan.io
, you’ll see the current token holdings associated with that address.
Make sure you understand the units (often the smallest unit might be displayed, and you may need to convert them to a more human-readable format).
ethers.js
if the network is EVM-compatible and you have the correct provider endpoint.
In the event of issues, the peaq.subscan.io
explorer provides a simple GUI fallback. By combining these approaches, developers and users can confidently monitor
and verify the holdings in their peaq wallets.