foundry-rs / book

A book on all things Foundry, available at https://book.getfoundry.sh.
https://book.getfoundry.sh
Apache License 2.0
801 stars 633 forks source link

Feat: Add a section reg best practice for testing upgradeable(UUPS, Beacon and TransparentProxy) smart contracts #920

Closed 0xdevant closed 1 month ago

0xdevant commented 1 year ago

As mentioned above, adding a new section in the foundry book regarding the best practice for testing upgradeable(UUPS, Beacon and TransparentProxy) smart contract would be appreciated.

FYI the closest helper contracts I could find online on how to test upgradeable smart contracts is this repo: https://github.com/odyslam/foundry-upgrades, but it only supports testing on UUPS/Beacon, not sure if this is the best practice by far, and no support for TransparentProxy as well.

Thank you!

zerosnacks commented 1 month ago

Thanks @0xdevant for your suggestion

Picking the right proxy is highly context dependent and can easily become outdated, therefore I think this is better suited for OpenZeppelin: https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades