The operation parser can recognize a subset of FA2 transfer calls to a KT1
contract listed in the registry and show Transfer tokens to (receiver
address) and Token Amount instead of a single opaque Parameter field.
The Destination field (FA2 contract) is omitted from the review flow for
those contracts; the Token name field is not shown.
- Destination is a KT1 contract whose 20-byte hash is listed in the in-app
FA2 token registry (
FA2_TOKEN_REGISTRYinapp/src/parser/fa2_tokens.c). - Entrypoint name is exactly
transfer(string match after read). - The Micheline parameter matches the single-transfer shape parsed by
tz_step_read_fa2_transfer: outerlist/Pairoffrom_, txslistwith onePairofto_and innerlist(pair(token_id, amount))(or the equivalent directPairencoding for a single inner item). token_idmust be zero (single-byte Zarith0x00). Non-zero IDs fall back to generic parameter display (often Parameter with complex/binary presentation).- No extra bytes after the parsed amount: the parser must consume the whole parameter expression; otherwise it falls back to binary display.
- Multiple transfers in the txs list, non-zero
token_id, negative or non-standard amount encoding, or any Micheline shape that does not match the parser: the field is shown asParameterwithis_field_complexset (seefa2_fallback_to_binary). - Unknown tokens (contract not in the registry): the amount is still shown as a decimal string, but without symbol/decimal scaling from a registry entry. Transfer tokens to still appears for successful FA2-shaped parameters; Destination stays visible if the contract is not in the registry.
Decimals and symbols come only from the static registry compiled into the app. There is no runtime fetch from chain or third-party APIs.
- C unit tests in
tests/unit/ctest/tests_parser.c(FA2-related cases). - Hex blobs for those tests can be regenerated with
scripts/gen_fa2_ctest_hex.py(requirespip install base58).