-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add readme describing how using the script
- Loading branch information
Showing
2 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
## 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-json | ||
``` | ||
|
||
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 | ||
|
||
## 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters