feat(l2cm): add transaction generation script & L2ContractsManager#656
Conversation
|
This is great, I think we might want to serialize an array of transactions instead of just a bunch of objects, other than that I love this. |
packages/contracts-bedrock/src/libraries/NetworkUpgradeTxns.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/src/libraries/NetworkUpgradeTxns.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/src/libraries/NetworkUpgradeTxns.sol
Outdated
Show resolved
Hide resolved
0xOneTony
left a comment
There was a problem hiding this comment.
This looks good so far! 🔥 It would be cool to use the library to create the whole set of txs for a previous set of NUTs e.g. Jovian, Isthmus and compare the json and the txs that we create against the txs of the go scripts
Added a test checking the file generation here |
#663) * feat: add a generation script using NUT library, add sample L2CM * chore: rename script to match doc terms * feat(l2cm): add deterministic upgrades (#665) * feat: add deterministic upgrades to TransactionGeneration script & ProxyUpgrade struct to L2CM * fix: predeploy deployments with constructor * feat: add separate interface file for create2 preinstall * docs: add natspec * refactor: add single getChangedPredeploys * feat: add L2ImplementationsDeployer * refactor: add addFeeVault helper * refactor: remove l2impldeployer from script * fix: replace performDelegateCall signature with selector * refactor: move proxy upgrades logic to L2CM * refactor: use only upgradeTo * fix: revert console log --------- Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
| /// @param gas Gas limit | ||
| /// @param forgeArtifactPath Contract artifact path (e.g., "GasPriceOracle.sol:GasPriceOracle") | ||
| /// @return Upgrade transaction struct | ||
| function newDeploymentTx( |
There was a problem hiding this comment.
We should remove this, tracking it here
* test: add idempotent upgrade test & hard fork name input param * fix: remove newDeploymentTx helper from NUT lib * fix: skip proxyadmin accordingly * fix: move tx gen script test to /scripts * fix: remove l1block check * refactor: l2cm execute without args * test: add implementation checks * refactor: remove returndata from l2cm functions * fix: remove extra comment on predeployhelper * docs: add natspec for XForkContractsManager * fix: remove xforkcm constructor checks * test: add expect upgrade event emission
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Closes OPT-1271
Adds a Solidity-based NUT library and scripts to deploy predeploy implementations via CREATE2 and orchestrate proxy upgrades through a new L2 Contracts Manager; bumps L1Block to v1.8.0 and extends ProxyAdmin for delegatecall execution.
Note
Adds Solidity-based tooling to deploy predeploy implementations via CREATE2 and orchestrate proxy upgrades through a new L2 Contracts Manager with generated Network Upgrade Transactions.
src/L2/L2ContractsManager.sol(abstract manager withexecutehooks) andsrc/L2/XForkContractsManager.sol(concrete) to batch proxy upgrades.src/L2/L2ImplementationsDeployer.solto compute/deploy implementations via preinstallCreate2Deployerwith auth/idempotency.src/libraries/NetworkUpgradeTxns.solto build DepositTx-compatible NUT artifacts and read/write JSON.scripts/deploy/PredeployHelper.sol(collects predeploys, builds init code, computes CREATE2 addrs) andscripts/deploy/TransactionGeneration.s.sol(deploy impls, deploy L2CM via CREATE2, then execute upgrades; writesdeployments/nut-*.json).src/universal/ProxyAdmin.solwithperformDelegateCallto delegatecallL2ContractsManager.execute(auth-gated).interfaces/preinstalls/ICreate2Deployer.solfor CREATE2 deploy/address computation.test/libraries/NetworkUpgradeTxns.t.sol(hash vectors, JSON roundtrip) andtest/scripts/TransactionGeneration.t.sol(end-to-end deployment/execute, structure, idempotency)..gitignore: ignoredeployments/nut-*.json.Written by Cursor Bugbot for commit 3516df7. This will update automatically on new commits. Configure here.