openzeppelin-foundry-upgrades icon indicating copy to clipboard operation
openzeppelin-foundry-upgrades copied to clipboard

Add `UnsafeUpgrades` library for use with `forge coverage`

Open ericglau opened this issue 1 year ago • 0 comments

Fixes #44 Fixes #34

forge coverage does not work with Upgrades.sol because that library performs deployments using artifact bytecode instead of instantiating contracts directly. It needs to use bytecode for the reasons described in https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades/issues/34#issuecomment-2025693908

This PR adds a new UnsafeUpgrades.sol which works with forge coverage.

Note that UnsafeUpgrades does not perform any upgrade safety validations, so is not recommended for use with Forge scripts.

ericglau avatar Apr 23 '24 03:04 ericglau