xmtpd icon indicating copy to clipboard operation
xmtpd copied to clipboard

Improve upgrade tests by managing contracts state

Open fbac opened this issue 9 months ago • 0 comments

Problem statement

Currently the upgrade test don't deploy or upgrade contracts, instead they rely on the blockchain status blindly. If an upgrade requires new contracts to be deployed, or an old ABI has changed, the upgrade test fails.

Expected behavior

Upgrade test is able to deploy, upgrade or re-deploy the needed contracts introduced on each version. A naive flow would be:

old version test start
- deploy needed contracts.
- load envVars.
- test

new version test start
- deploy new contracts if any.
- upgrade existing contracts if there's an upgrade script available.
- load envVars again, as an old envVar could be overridden by a new contract address.
- test

fbac avatar Feb 27 '25 12:02 fbac