Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): allow DelegateOwner to delegatecall for batching #17022

Merged
merged 39 commits into from
May 9, 2024

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented May 7, 2024

If we want to use one L2 transaction to upgrade all contracts that are owned by DelegateOwner, then we need to allow DelegateOwner to delegatecall to a multicall3 contract.

Note that on L1, when we use Gnosis safe wallet, the wallet supports delegatecall too, so we can also batch-upgrade L1 contracts with one single transaction. A few unit tests have been added to verify batching is possible.

In this PR, I also added a dry-run fuction to verify calls on L2 will succeed. This function will come handy when we try to construct the calldata on L1.

@dantaik dantaik changed the title feat(protocol): allow DelegateOwner to delegatecall feat(protocol): allow DelegateOwner to delegatecall for batching May 7, 2024
Copy link

openzeppelin-code bot commented May 7, 2024

feat(protocol): allow DelegateOwner to delegatecall for batching

Generated at commit: 033a3e807f020f1cf2c067f6086c3dc8061bf584

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
2
0
6
41
51
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@dantaik dantaik marked this pull request as ready for review May 7, 2024 15:39
@dantaik dantaik marked this pull request as draft May 8, 2024 03:35
@dantaik dantaik marked this pull request as ready for review May 8, 2024 06:31
@dantaik dantaik requested review from adaki2004 and Brechtpd May 8, 2024 06:42
@dantaik dantaik added this pull request to the merge queue May 9, 2024
Merged via the queue into main with commit 7e1374e May 9, 2024
4 checks passed
@dantaik dantaik deleted the delegate_owner_multicall branch May 9, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants