Add script to generate pool booster safe transactions#2824
Add script to generate pool booster safe transactions#2824clement-ux wants to merge 3 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2824 +/- ##
=======================================
Coverage 44.95% 44.95%
=======================================
Files 106 106
Lines 4585 4585
Branches 1250 1250
=======================================
Hits 2061 2061
Misses 2521 2521
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rameters and improve usage documentation
naddison36
left a comment
There was a problem hiding this comment.
I would have done this using a Hardhat task rather than a bash script for these reasons:
Hard coded addresses rather than reusing addresses in a common file.
Hardhat has CLI infrastructure that helps a lot of the user input validation.
I recently moved Safe file generation out into a js utils file in contracts/utils/safe.js
No need to redo it. But we should have a discussion about what we want to build CLIs in moving forward. I'm not fixed on Hardhat. A js cli package like commander would work just as well. Foundry scripts are also a good option if there's not much off-chain logic.
This pull request introduces a new script,
generate-pool-booster-safe.sh, designed to automate the generation of Safe Transaction Builder JSON files for deploying Curve Pool Booster contracts and delegating yield. The script validates user input, verifies gauge registration, computes necessary parameters, and outputs a structured JSON transaction bundle suitable for Safe multisig execution.The most important changes are:
Addition of deployment automation script:
generate-pool-booster-safe.sh, a Bash script for generating Safe Transaction Builder JSON to deployCurvePoolBoosterPlaincontracts and delegate yield for specified gauges. The script accepts multiple command-line options and validates all required arguments.Validation and verification logic:
Transaction building and output:
User experience and safety: