Prep for Publish
Use thru abi prep-for-publish when you need a publishable ABI YAML artifact before thru abi account create or upgrade.
Use This When
Section titled “Use This When”- 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
Syntax
Section titled “Syntax”thru abi prep-for-publish \ --file <FILE> \ --target-network <NETWORK> \ --output <FILE> \ [--include-dir <DIR>...] \ [--verbose]Publish Rules
Section titled “Publish Rules”| Rule | Result |
|---|---|
| Local path imports | inlined into the output file. |
| On-chain imports on the target network | Kept in the output file. |
| On-chain imports on another network | Command fails. |
git imports | Command fails. |
http imports | Command fails. |
Minimal Pattern
Section titled “Minimal Pattern”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 createbecause it strips out local-only packaging assumptions. - The
thrucommand uses--target-network. The standaloneabibinary uses the same workflow with a shorter--networkflag. - Verbose mode prints which local imports were inlined and how many packages were resolved.