Testnet, tokens have no value. Do not send real assets.
Skip to Content
ConceptsThe EVM facade & AE-20

The EVM facade & AE-20

Aeva runs an EVM (Cosmos EVM, EIP-155 chain id 2382) next to its native modules. Every right kind and every asset’s bundle is exposed as an AE-20 token: an ERC-20 interface backed by a precompile at a derived address. The rights themselves stay in the native state; the ERC-20 is a view and a way in.

  • Addresses are derived, not deployed: right keccak256("aeva/right/v1" ‖ asset_id ‖ uint32_be(kind_id))[12:], bundle keccak256("aeva/bundle/v1" ‖ asset_id)[12:]. Every asset gets them at creation; the explorer shows them on the asset page.
  • balanceOf is the transferable balance, units minus locked units (for a bundle, whole transferable units). unitsOf, encumberedOf and wholeUnitsOf give the rest.
  • Policy applies. A transfer that the native policy refuses reverts with a stable reason (for example aeva: policy denied), listed in the reference.
  • No mint, burn, issue or redeem through the EVM; those stay native.
  • Bundle transfers move one unit of every bundled kind per unit, all or nothing.
  • Coins too: AEVA is the EVM’s native coin; aeUSD is an ERC-20 at 0x5aB37c022D0ce153F1C1949a88a93A8DC3E546D7.
  • One key, two addresses: an account’s 0x… and aeva1… forms are the same 20 bytes (see Wallets).

CLI

aevad query erc20rights tokens <asset-id> # the kind addresses, bundle last aevad query erc20rights token <0x-address>

With any Ethereum tool, against https://evm.aevachain.com:

cast call <ae20-address> "balanceOf(address)(uint256)" <0x-holder> --rpc-url https://evm.aevachain.com

No code at the address

An AE-20 token is a precompile: eth_getCode returns 0x at its address. Solidity before 0.8.10 checks that the target has code before every high-level external call, so a contract compiled with an older compiler that calls IERC20(token).balanceOf(x) on an AE-20 reverts even though the call itself would succeed. Compile with solc 0.8.10 or later, or use low-level calls (token.staticcall(...)), which have no such check. The testnet DEX (Uniswap v2, solc 0.5.16 / 0.6.6) reads balances with a low-level staticcall for this reason; see Swap and pools.

On the explorer

/token/<0x> opens the asset an AE-20 address belongs to (the kind’s row for a right token); /address/<0x> shows the account under its aeva1… form once it has appeared on chain. Ethereum-style links work too: /tx/<hash>, /address/<0x>, /token/<0x>, /block/<n> (EIP-3091).

Last updated