Forge Proposal Simulator
  • Forge Proposal Simulator
  • Overview
    • Use cases
    • Architecture
      • Addresses
      • Proposal Functions
  • Guides
    • Introduction
    • Multisig Proposal
    • Timelock Proposal
    • Governor Bravo Proposal
    • OZ Governor Proposal
    • Customizing A Proposal
    • Mainnet examples
      • Arbitrum Timelock
      • Compound Governor Bravo
      • Optimism Multisig
      • ENS OZ Governor
  • Testing
    • Integration Tests
  • Github Actions
    • Printing Calldata on Pull Requests
Powered by GitBook
On this page
  • Overview
  • Creating the Workflow
  • Example implementation
  1. Github Actions

Printing Calldata on Pull Requests

PreviousIntegration Tests

Last updated 10 months ago

Overview

The following guide explains how to create a GitHub Action that prints the proposal output on PRs. The output includes calldata, newly deployed addresses, changed addresses, and proposal actions. Once the action is executed, the output will be printed in a comment on the PR. It's worth noting that if a PR touches multiple proposals, the comment will only contain the output of the proposal with the greatest number.

Creating the Workflow

To create the workflow, follow these steps:

  1. Copy the code from and paste it into a new file named run-proposal.yml in the .github/workflows folder.

  2. Change the PROPOSALS_FOLDER to the folder where the proposals are located.

  3. Add the Forge Proposal Simulator path before the run-proposal.sh script: lib/forge-proposal-simulator/run-proposal.sh.

  4. In case the proposal names are different from *Proposal_1.sol, copy the into your repository and customize it as needed. Update the path in step 3 to ./run-proposal.sh.

  5. Check the Github repository settings and make sure Read and Write Permissions are enabled in the Workflow Permissions section.

Whenever a Pull Request that involves a proposal is created, the action will automatically execute and display the output of the proposal in a comment on the PR. This enables the developer to locally run the proposal and validate whether the output corresponds with the one shown on the PR.

Example implementation

The above workflow has been implemented in .

fps-example-repo
script
fps-example-repo