Files
pwap/check-hez-balance.mjs
T
pezkuwichain 5686386ef6 chore: Add utility scripts for DEX pool management
- check-asset-state.mjs: Asset state verification
- check-balances.mjs: Balance checking utilities
- check-founder-balances.mjs: Founder account balance checks
- check-hez-balance.mjs: HEZ token balance verification
- check-pool-balances-detailed.mjs: Detailed pool balance analysis
- create-all-pools.mjs: Automated pool creation
- create-pez-wusdt-pool.mjs: PEZ/wUSDT pool setup
- mint-and-create-pools.mjs: Mint tokens and create pools
- mint-whez.mjs: wHEZ minting utility
- verify-pool-state.mjs: Pool state verification
- wrap-hez-and-create-all-pools.mjs: HEZ wrapping and pool setup

These scripts support DEX pool management and testing for beta testnet.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 12:55:15 +03:00

28 lines
1.1 KiB
JavaScript

import { ApiPromise, WsProvider } from '@polkadot/api';
import { Keyring } from '@polkadot/keyring';
import { cryptoWaitReady } from '@polkadot/util-crypto';
async function main() {
await cryptoWaitReady();
const wsProvider = new WsProvider('ws://127.0.0.1:9944');
const api = await ApiPromise.create({ provider: wsProvider });
const keyring = new Keyring({ type: 'sr25519' });
const founder = keyring.addFromUri('skill dose toward always latin fish film cabbage praise blouse kingdom depth');
console.log('Founder address:', founder.address);
// Check native HEZ balance
const { data: balance } = await api.query.system.account(founder.address);
console.log('\nNative HEZ balance:', balance.free.toHuman());
console.log('Reserved:', balance.reserved.toHuman());
console.log('Frozen:', balance.frozen.toHuman());
// Check wHEZ balance
const whezBal = await api.query.assets.account(0, founder.address);
console.log('\nwHEZ balance:', whezBal.isSome ? whezBal.unwrap().balance.toHuman() : '0');
await api.disconnect();
}
main().catch(console.error);