ADR 0006 — Post-deploy hooks and frontend env sync
Status
Accepted 2026-06-25.
Context
Multi-contract Soroban projects often need admin-signed wiring after constructors run: set_minter, set_burner, and similar authority edges that cannot be set at deploy time because of circular address dependencies. The stellar-album course project is the first real consumer: seven contracts, four post-deploy invokes, and a Vite frontend that reads contract IDs from frontend/.env.local instead of @caatinga/client artifacts.
Caatinga already supports topological deploy and ${contracts.<name>.contractId} placeholders (ADR 0005). It did not support:
${source.address}for constructor args that need the deployer/admin identity- Declarative post-deploy invoke sequences
- Syncing deployment artifacts into frontend
.envfiles for custom frontends
Decision
- Add
${source.address}as a second artifact-safe placeholder, resolved viastellar keys address <source>at deploy and wire time. Still no${env.*}or shell interpolation. - Add optional
postDeployhooks incaatinga.config.ts, executed bycaatinga wireand automatically after a fullcaatinga deploy(unless--no-wire). - Add optional
frontend.envFile+frontend.envmapping, written bycaatinga sync-envand automatically after a full deploy (unless--no-sync-env). - Add optional
buildRootfor Cargo workspaces: onestellar contract buildfrom the workspace root instead of per-crate builds.
Consequences
- Real multi-contract adoption is validated against stellar-album without a bundled template.
- Post-deploy hooks are config, not plugins — the first step toward the plugin roadmap in architecture.md, without a plugin loader yet.
- Frontends that do not use
@caatinga/clientcan still consume Caatinga deploy state via generated.env.localfiles. caatinga wirefailures after deploy do not roll back artifacts; recovery is explicit (caatinga wire, orcaatinga deploy --forcewhen redeploy is also desired).
Related
- ADR 0005 — deploy graph and contractId placeholders.
- Case study: stellar-album — end-to-end workflow.