taiko-mono icon indicating copy to clipboard operation
taiko-mono copied to clipboard

feat(protocol): allow DelegateOwner to delegatecall for batching

Open dantaik opened this issue 9 months ago • 2 comments

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 avatar May 07 '24 15:05 dantaik

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

openzeppelin-code[bot] avatar May 07 '24 15:05 openzeppelin-code[bot]

Tests added, please take another look.

dantaik avatar May 08 '24 06:05 dantaik