Skip to content

@armada/sdk / index / erc20AddressFromHash

Function: erc20AddressFromHash()

erc20AddressFromHash(tokenHash): `0x${string}` | undefined

Defined in: src/sync/balances.ts:165

Recover an ERC20 token address from its token hash. For ERC20 the hash IS the address, zero-padded to 32 bytes (matching the stock engine's TokenDataGetter), so no registry is needed — any pool ERC20 is self-describing. Returns undefined for a non-ERC20-shaped hash (e.g. an NFT hash, which is a non-invertible Poseidon hash); NFTs are out of scope (SPEC §1.4), so such notes are simply not resolved.

Parameters

tokenHash

string

Returns

`0x${string}` | undefined