Skip to content

Enable HyperEVM automatic token detection - #1063

Open
j0ntz wants to merge 1 commit into
masterfrom
jon/hype-autodetect-tokens
Open

Enable HyperEVM automatic token detection#1063
j0ntz wants to merge 1 commit into
masterfrom
jon/hype-autodetect-tokens

Conversation

@j0ntz

@j0ntz j0ntz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

Asana task

Fixes HyperEVM (chainId 999) not auto-detecting tokens that arrive in a wallet. Every other EVM chain auto-detects via a deployed on-chain balance-checker contract; HyperEVM's RPC adapter config was missing the ethBalCheckerContract address, so RpcAdapter.fetchTokenBalances stayed null and the engine only re-checked already-enabled tokens, never discovering new ones.

This adds the contract address to the HyperEVM rpc adapter config, matching Sonic/Monad/Celo/RSK/FilecoinFEVM/opBNB.

Contract deployment. The balance-checker is byte-identical to the one already live on the other chains (same balances(address[],address[]) / tokenBalance contract). It is deployed on HyperEVM at 0x75c246EaCe343aCe287c1A37B45D7BD4214C6f27 (tx 0x6e811d894e8f6fac31a67e081c7f5f651c72ddba7b34dfea3570f40563563fbb). Its deployed runtime bytecode is verified byte-for-byte equal to the contract on Sonic/Celo/opBNB. The contract is stateless and trustless (pure view functions, no owner, fallback reverts on payment).

Note: the canonical 0x726391B6cA41761c4c332aa556Cf804A50279b52 used on the other 6 chains was deployed by the Edge deployer EOA 0xbc291f404bde7e9e819da0ebe2eb06d400220520 (direct CREATE at nonce 0, not a CREATE2 factory), so reproducing that exact address on HyperEVM requires that deployer key. That EOA currently has nonce 0 on HyperEVM, so if chain-wide address consistency is preferred, the contract can instead be deployed from that deployer and this one line updated to 0x726391....

Testing

  • On-chain: the deployed contract's balances([wallet],[tokens]) returns correct HyperEVM balances (verified via direct RPC call).
  • In-app (iOS sim, edge-funds, modified plugin served via DEBUG_ACCOUNTBASED dev-server): a HyperEVM wallet auto-detected an HFUN token balance (0.0645 HFUN / $0.632) that the published build did not surface. Cross-checked on-chain: the wallet holds the token via the deployed checker. See attached screenshots.

Note

Low Risk
Single optional config field on HyperEVM network metadata; no auth, spend, or shared engine logic changes.

Overview
HyperEVM wallets can auto-detect incoming ERC-20 tokens again by wiring the same on-chain balance-checker pattern other EVM chains use.

The HyperEVM rpc network adapter config now includes ethBalCheckerContract at 0x75c246EaCe343aCe287c1A37B45D7BD4214C6f27, so RpcAdapter batch balance queries run during sync instead of staying disabled and limiting checks to already-enabled tokens. The Unreleased CHANGELOG entry documents the fix.

Reviewed by Cursor Bugbot for commit f73bbc7. Bugbot is set up for automated code reviews on this repo. Configure here.

Add the ethBalCheckerContract address to the HyperEVM RPC adapter
config so the engine batch-scans token balances and surfaces tokens
that arrive in the wallet, matching the other EVM chains. The contract
must be deployed on HyperEVM at this address for detection to work.
@j0ntz

j0ntz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence: HyperEVM token autodetect

agent proof 1211539505635265 01 hyperevm autodetect

agent proof 1211539505635265 01 hyperevm autodetect

agent proof 1211539505635265 02 hyperevm usdt0 detected

agent proof 1211539505635265 02 hyperevm usdt0 detected

Captured by the agent's in-app test run (build-and-test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant