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.
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.jsonfile with all the proposal and deployment details - A
calldata.jsonfile with the proposal information and the raw calldata
Once all the files are in place:
- Add
RUN_UPGRADE_1_4_0_TESTS_AT_FORK_BLOCKto 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.
- Deploy the framework
- Deploy the plugins
- Copy the deployment json files to the
./files-to-mergefolder - Run the script to merge the proposal actions
- The
./generatedfolder will be created with themerged-proposals.jsonfile and thecalldata.jsonfile
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.