The SS58 address to check/map.
The signer for the account (must match the address).
An object with addressIsMapped() (e.g., from createInkSdk(client)).
A typed API with tx.Revive.map_account().
Optionaloptions: EnsureAccountMappedOptionsOptional timeout and status callback.
The transaction result if mapping was performed, or null if already mapped.
import { ensureAccountMapped } from "@polkadot-apps/tx";
import { createInkSdk } from "@polkadot-api/sdk-ink";
const inkSdk = createInkSdk(client);
const api = client.getTypedApi(descriptor);
await ensureAccountMapped(address, signer, inkSdk, api);
// Account is now mapped — safe to call EVM contracts
Ensure an account's SS58 address is mapped to its H160 EVM address on-chain.
Account mapping is a prerequisite for any EVM contract interaction on Asset Hub. This function checks the on-chain mapping status and, if unmapped, submits a
Revive.map_account()transaction and waits for inclusion.Idempotent — safe to call multiple times. Returns immediately if already mapped.