---
title: Publishing and Iteration
description: Prepare an ABI for publication, publish it against the right
  program seed, and verify the on-chain ABI artifact.
source_url:
  html: https://thru.org/docs/abi/deployment-and-program-testing/
  md: https://thru.org/docs/abi/deployment-and-program-testing.md
---

# Publishing and Iteration

Use this page when the ABI is locally validated and you are ready to publish or upgrade the ABI artifact that goes with a deployed program.

## Publish With The Program Seed

The program and ABI should use the same seed.

```bash
thru program create my_program ./build/thruvm/bin/my_program_c.bin
thru abi account create my_program ./program.abi.yaml
```

That seed match matters because it is how downstream tooling can associate the deployed program with the ABI it should use for reflection.

## ABI-Focused Flow

1. validate the ABI locally first with [Validation and roundtrip testing](https://thru.org/docs/abi/validation-and-roundtrip-testing.md)
2. confirm the published artifact will be explorer-compatible with [Explorer Compatibility](https://thru.org/docs/abi/explorer-compatibility.md)
3. if the ABI still depends on local imports, normalize it with [ABI Prep for Publish](https://thru.org/docs/cli-reference/abi-prep-for-publish.md)
4. create or upgrade the ABI account with [ABI Account](https://thru.org/docs/cli-reference/abi-account.md)
5. read the ABI back with `get --include-data` to confirm the published artifact is the one you expected

## Common ABI Publishing Gotchas

- publishing an ABI that was never roundtrip-tested
- publishing an ABI without `program-metadata.root-types`
- publishing only separate per-instruction structs instead of one discriminated instruction root
- publishing an ABI with a different seed than the deployed program
- forgetting that local imports need to be normalized before publication
- finalizing too early and losing the ability to upgrade or close the ABI account

## Typical Follow-Up Commands

- [ABI Prep for Publish](https://thru.org/docs/cli-reference/abi-prep-for-publish.md)
- [ABI Account](https://thru.org/docs/cli-reference/abi-account.md)
- [Explorer Compatibility](https://thru.org/docs/abi/explorer-compatibility.md)
- [Recommended Development Pattern](https://thru.org/docs/program-development/program-development-lifecycle.md) for the broader deploy, test, and debug loop
