Skip to content

feat(cli): export deployed contract IDs and transaction hashes to JSON - #865

Open
gospeltout wants to merge 1 commit into
BCPathway:mainfrom
gospeltout:Export-deployed-addresses-to-JSON
Open

feat(cli): export deployed contract IDs and transaction hashes to JSON#865
gospeltout wants to merge 1 commit into
BCPathway:mainfrom
gospeltout:Export-deployed-addresses-to-JSON

Conversation

@gospeltout

Copy link
Copy Markdown

What does this PR do?

Adds deployment artifact JSON export capabilities to @bc-forge/cli under the CLI Deployment Orchestrator epic.

  • Outputs deployed Contract IDs (vault, fee, etc.), WASM hashes, transaction hashes (e.g. fee contract linking TX), target network metadata, and ISO timestamps to deployments.json.
  • Guarantees safe atomic file overwrites via temporary file creation, disk syncing (fs.fsyncSync), and atomic renaming (fs.renameSync) to prevent data corruption or partial file writes on overwrite.
  • Introduces the export-deployments (alias export) command and adds the -o, --out <path> flag to bc-forge deploy.
  • Adds unit tests for JSON building, atomic overwrites, nested directory creation, error state handling, and CLI command options.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • CI
  • Chore

Checklist

  • I ran pre-commit run --all-files locally and it passed
  • All CI jobs pass on this branch
  • I added or updated tests for new behaviour
  • I updated relevant docs / comments
  • No secrets or credentials are included
  • No breaking changes to public APIs (or I've documented them)

Breaking changes?

No breaking changes. The -o, --out flag on bc-forge deploy is optional, preserving backward compatibility for existing scripts.

Related issues

Closes #702

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@gospeltout Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] Utility: Export deployed addresses to JSON

1 participant