Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 2.73 KB

File metadata and controls

66 lines (42 loc) · 2.73 KB

Description

This script merges the plugin proposal actions defined in the files inside the files-to-merge folder and the deployed_contracts.json file into the merged-proposals.json file.

How it works

Before running this script, you need to deploy the plugins and the framework.

To deploy the framework, run the deploy script in the packages/contracts folder:

yarn deploy --network <network> --tags <the tags>

For deploying version 1.4.0 on Sepolia, you can run:

yarn deploy --network sepolia --tags v1.4.0,VerifyEnd,ConcludeEnd

This will generate a deployed_contracts.json file in the packages/contracts folder that will be used by this script to merge proposal actions. The proposal information will be included (for more details, check the first deployment step in the 01_Info.ts file). You can modify this information as needed (elements like the proposal end date might need modification).

After deploying the framework, go to each plugin repository and run the deploy script:

yarn deploy --network <network> --tags <the tags>

For deploying and publishing a new version on Sepolia, you can run:

yarn deploy --network sepolia --tags NewVersion,Verification

This deployment will generate a createVersionProposalData-network.json file that you need to copy to the ./files-to-merge folder.

Once you have both the deployed_contracts.json file and the plugin deployment json files, you can run this script to merge the proposal actions:

yarn generate-proposal

This will generate two files in the ./generated folder:

  • A merged-proposals.json file with all the proposal and deployment details
  • A calldata.json file with the proposal information and the raw calldata

Testing the calldata

Once all the files are in place:

  • Add RUN_UPGRADE_1_4_0_TESTS_AT_FORK_BLOCK to the .env and set a fork block, it is recommended to use a recent block.
  • Run yarn test. This will test the call data and simulate the proposal creation and execution.

Steps

  1. Deploy the framework
  2. Deploy the plugins
  3. Copy the deployment json files to the ./files-to-merge folder
  4. Run the script to merge the proposal actions
  5. The ./generated folder will be created with the merged-proposals.json file and the calldata.json file

Note

To test the deployment and the generated calldata, you can check the tests in the test/deploy/deployment-1.4.0.ts file. It will attempt to create, approve, and execute the proposal with the calldata generated by this script. This file is specific for checking the deployment of version 1.4.0; you might need to modify it for other versions. Also, note that the test is forking the network, so you might need to adjust the network name and the fork block number.