Query ERC20 and Substrate token balances directly from on-chain storage — no smart contract deployment needed. This app uses Hyperbridge storage queries, providing fast and verifiable balance lookups across multiple networks.
- 🔗 Query ERC20 balances across Ethereum, Polygon, and Arbitrum
- ⚡ Direct storage-level reads (no RPC eth_call or contracts)
- 🧩 Substrate (AssetHub/Hyperbridge) address querying
- 🧮 Powered by Hyperbridge SDK
pnpm install
pnpm install @hyperbridge/sdk viem @polkadot/util-crypto scale-ts
Create a .env.local file in the root of the project:
VITE_APP_POLYGON_RPC_URL=
VITE_APP_ETHEREUM_RPC_URL=
VITE_APP_ARBITRUM_RPC_URL=
You can use Alchemy, Infura, or any RPC that supports debug_traceCall.
src/
├── services/
│ └── balance-query.ts # Balance fetch via Hyperbridge Storage queries
├── config/
│ └── chain.ts # Supported EVM chains
│ └── constants.ts # Constants
│ └── tokens.ts # All supported tokens
├── utils/
│ └── substrateStorage.ts # Substrate storage queries
└── App.tsx # UI + integration
- Uses Hyperbridge SDK to calculate the ERC20 balanceOf storage slot
- Reads the slot directly via eth_getStorageAt
- Decodes the balance using token decimals
- Derives storage keys for System.Account and Assets.Account
- Queries balances via state_getStorage
- Decodes SCALE-encoded values using scale-ts
npm run dev # Start development server
npm run build # Build production app
npm run lint # Check code quality