Skip to content

Prep for Publish

View as Markdown

Use thru abi prep-for-publish when you need a publishable ABI YAML artifact before thru abi account create or upgrade.

  • you have local path imports that need to be inlined before publishing
  • you want to enforce that remaining imports are valid on-chain imports for one network
  • you need a stable artifact to review before pushing ABI contents on-chain

Choose another ABI command when:

  • you only need one flattened YAML file without publish rules: Flatten
  • you want to publish immediately: Account
Terminal window
thru abi prep-for-publish \
--file <FILE> \
--target-network <NETWORK> \
--output <FILE> \
[--include-dir <DIR>...] \
[--verbose]
RuleResult
Local path importsinlined into the output file.
On-chain imports on the target networkKept in the output file.
On-chain imports on another networkCommand fails.
git importsCommand fails.
http importsCommand fails.
Terminal window
thru abi prep-for-publish \
--file ./program.abi.yaml \
--include-dir ./abi \
--target-network testnet \
--output ./dist/program.publish.abi.yaml \
--verbose
  • This command is the safest handoff point before abi account create because it strips out local-only packaging assumptions.
  • The thru command uses --target-network. The standalone abi binary uses the same workflow with a shorter --network flag.
  • Verbose mode prints which local imports were inlined and how many packages were resolved.