solidity-labs-io / fps-example-repo

Forge Proposal Simulator Example Repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Forge Proposal Simulator Example Repository

Overview

This repository serves as a practical example for utilizing the Forge Proposal Simulator. It is designed to guide users through the process of creating and executing proposals using FPS.

Getting Started

Before diving into the repository, it is crucial to familiarize yourself with the FPS framework. Comprehensive details and instructions are available in our documentation.

Repository Structure

The repository is structured into distinct folders, each with a designated function:

proposals

Contains a range of proposal contracts. Each contract is an implementation of one of the proposal types outlined in the FPS guides. Proposals may include deploying new contracts, interacting with these contracts (e.g., transferring ownership), generating calldata for target contracts, and validating the protocol state post-execution.

scripts

Contains a script for deploying each proposal.

test/multisig

  • MultisigPostProposalCheck.sol: Base contract for multisig integration tests. Responsible for deploying, executing proposal contracts and updating addresses object.
  • MultisigProposalIntegrationTest.t.sol: Integration test for MULTISIG_01.sol, inheriting from MultisigPostProposalCheck.sol.

test/timelock

  • TimelockPostProposalCheck.sol: Base contract for timelock integration tests. Responsible for deploying, executing proposal contracts and updating addresses object.
  • TimelockProposalIntegrationTest.t.sol: Integration test for TIMELOCK_01.sol, derived from TimelockPostProposalCheck.sol.

Executing Proposals with FPS

FPS offers two methods for proposal execution, as detailed in our documentation:

1. Using Forge Scripts

2. Using Forge Test

  • Run forge test -vv to execute all integration tests.

For further assistance, please open an issue at FPS Issues

About

Forge Proposal Simulator Example Repository


Languages

Language:Solidity 96.3%Language:Shell 3.7%