Skip to content

Analyze

View as Markdown

Use thru abi analyze when you need to understand how ABI types resolve before you generate code, publish an ABI, or debug a reflection failure.

  • you want to confirm imports and type resolution succeed
  • you need the shared layout IR in JSON or protobuf form
  • you want to preview generated footprint or validate helpers for one type

Choose another ABI command when:

Terminal window
thru abi analyze \
--files <FILE>... \
[--include-dir <DIR>...] \
[--print-ir] \
[--ir-format json|protobuf] \
[--print-footprint <TYPE>] \
[--print-validate <TYPE>]
FlagUse it for
--print-irPrint the shared layout IR after analysis.
`—ir-format jsonprotobuf`
—print-footprint <TYPE>Preview the generated legacy and IR footprint helpers for one type.
—print-validate <TYPE>Preview the generated legacy and IR validate helpers for one type.

Even without optional flags, analyze prints:

  • loaded files and resolved packages
  • discovered type definitions
  • detailed type analysis from the resolved graph

Optional flags add focused output on top of that base analysis.

Terminal window
thru abi analyze \
--files ./program.abi.yaml \
--include-dir ./abi
  • analyze is a good first stop when codegen or reflection fails because it exercises the same import and type-resolution path.
  • --print-ir is the most useful flag when you need to compare multiple ABIs or inspect cross-language layout behavior.
  • If you only care whether an input file is ready for on-chain publishing, use Prep for Publish instead of loading the whole analysis output into context.