Skip to content

Add constructor args and method call params to deployment summary #17

@RonTuretzky

Description

@RonTuretzky

Feature Request

Enhance the deployment summary output to include all parameters sent to constructors and all method calls made during the deployment flow.

Current Behavior

The deployment summary currently shows:

  • Contract name
  • Deployed address
  • Explorer link

Proposed Enhancement

Parse the run-latest.json broadcast file to extract and display:

  1. Constructor arguments for each deployed contract
  2. Method calls made during deployment (e.g., initialize(), grantRoles(), list())
  3. Parameters passed to each method call

Implementation Details

The run-latest.json file contains all this information in the transactions array:

{
  "transactions": [
    {
      "transactionType": "CREATE",
      "contractName": "ZuCitySystem",
      "contractAddress": "0x...",
      "arguments": ["0xAdminAddress"]
    },
    {
      "transactionType": "CALL",
      "contractName": "ZuCitySystem",
      "contractAddress": "0x...",
      "function": "initialize(address,address)",
      "arguments": ["0xTreasury", "0xWhitelist"]
    }
  ]
}

Suggested Output Format

## Deployment Summary

| Contract | Address | Constructor Args |
|----------|---------|------------------|
| ZuCitySystem | `0x...` | admin: `0x...` |
| Whitelist | `0x...` | admin: `0x...` |

<details>
<summary>Method Calls</summary>

| Contract | Method | Arguments |
|----------|--------|-----------|
| Whitelist | initialize | localToken: `0x...`, minAmount: 100e18, nfts: [] |
| ZuCitySystem | initialize | treasury: `0x...`, whitelist: `0x...` |
| ZuCitySystem | grantRoles | account: `0x...`, roles: 123... |
</details>

Use Case

This enhancement would help:

  • Verify deployment parameters are correct without checking etherscan
  • Quickly review what initialization steps were performed
  • Debug deployment issues by seeing exactly what was called
  • Generate comprehensive deployment documentation automatically

Additional Context

This would be useful for both the PR comment and the GitHub step summary outputs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions