Skip to content

feat: include constructor args and method calls in deployment summary#46

Open
rubydusa wants to merge 1 commit into
mainfrom
17-add-constructor-args-and-method-call-params-to-deployment-summary
Open

feat: include constructor args and method calls in deployment summary#46
rubydusa wants to merge 1 commit into
mainfrom
17-add-constructor-args-and-method-call-params-to-deployment-summary

Conversation

@rubydusa
Copy link
Copy Markdown
Contributor

@rubydusa rubydusa commented Apr 30, 2026

Summary

  • Closes Add constructor args and method call params to deployment summary #17. The deployment summary now reads the Foundry broadcast run-latest.json directly and renders constructor arguments for each deployed contract plus a collapsible Method Calls section that lists every post-deploy CALL with its function signature and arguments.
  • deployment-summary.sh now requires BROADCAST_FILE (already an output of parse-broadcast.sh); the obsolete deployment-summary.txt intermediate is gone.
  • _deploy-testnet.yml and _foundry-cicd.yml pass BROADCAST_FILE to the summary step.

Sample output

## Testnet Deployment Summary

| Contract | Address | Constructor Args | Explorer |
|----------|---------|------------------|----------|
| MyToken | `0x1234…5678` | `0xAdmin…0001` | [View]() |
| MyProxy | `0xabcd…abcd` | _(none)_ | [View]() |

<details>
<summary>Method Calls (1)</summary>

| Contract | Address | Method | Arguments |
|----------|---------|--------|-----------|
| MyProxy | `0xabcd…abcd` | `initialize(address,uint256)` | `0x1234…5678`, `1000000000000000000` |
</details>

Test plan

  • bash tests/test-deployment-summary.sh — 5/5 pass (table render, method-calls section, omission when no CALLs, custom title, missing-broadcast error)
  • bash tests/test-parse-broadcast.sh — 3/3 pass
  • Full local suite (bash tests/test-*.sh) — all green
  • find scripts/ -name '*.sh' -exec shellcheck -s bash {} + — clean
  • CI green on this PR

🤖 Generated with Claude Code

Closes #17. The deployment summary now reads run-latest.json directly and
emits constructor arguments per deployed contract plus a collapsible
section listing every post-deploy CALL with its function signature and
arguments.

- deployment-summary.sh: switched from deployment-summary.txt to
  BROADCAST_FILE, renders constructor args column and Method Calls
  <details> block (omitted when no CALLs).
- parse-broadcast.sh: dropped the now-unused deployment-summary.txt write.
- Workflows: pass BROADCAST_FILE through to the summary step.
- Tests + fixture: enriched broadcast fixture with arguments/function
  fields; expanded deployment-summary tests; trimmed parse-broadcast test
  for the removed file.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the deployment reporting pipeline to render a richer GitHub Actions step summary directly from Foundry’s run-latest.json, including constructor arguments for deployed contracts and a collapsible section listing post-deploy method calls with their arguments.

Changes:

  • deployment-summary.sh now consumes BROADCAST_FILE (Foundry broadcast JSON) and renders constructor args + a “Method Calls” <details> section.
  • Removes the deployment-summary.txt intermediate output from parse-broadcast.sh (now logs CREATE entries to stdout only).
  • Updates workflows to pass BROADCAST_FILE, and refreshes fixtures/tests to cover the new summary behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/deploy/deployment-summary.sh Generate step summary from broadcast JSON, including constructor args and CALL listings.
scripts/deploy/parse-broadcast.sh Stop writing deployment-summary.txt; emit CREATE entries to stdout and outputs to $GITHUB_OUTPUT.
tests/test-deployment-summary.sh Adds coverage for constructor args, method calls section, omission behavior, custom title, and missing broadcast error.
tests/test-parse-broadcast.sh Updates expectations to match stdout logging rather than a generated file.
tests/fixtures/broadcast/Deploy.s.sol/31337/run-latest.json Expands fixture to include arguments and a sample CALL transaction.
.github/workflows/_foundry-cicd.yml Passes BROADCAST_FILE into the deployment summary step.
.github/workflows/_deploy-testnet.yml Passes BROADCAST_FILE into the deployment summary step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 5
# Parse Foundry broadcast artifacts after deployment.
# Finds run-latest.json, extracts chain ID, writes deployment-summary.txt.
# Finds run-latest.json and extracts the chain ID.
#
Comment on lines 8 to 10
# BLOCKSCOUT_URL — required
# BROADCAST_FILE — required, path to run-latest.json
# SUMMARY_TITLE — optional, defaults to "Deployment Summary"
Copy link
Copy Markdown
Contributor

@RonTuretzky RonTuretzky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the copilot comments, looks good to me.

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.

Add constructor args and method call params to deployment summary

3 participants