Protocol
Upgrading a Protocol Facet
To upgrade a protocol facet, follow these steps:
- Set the environment variables in the
.env
file for the upgrade. Specifically set these variables:
- Run the following script:
Notice that the environment variables are automatically cleaned by the script. This is to prevent accidental faulty upgrades. Also, the script makes sure that the upgrade was successful by checking that the old selectors are first removed, and that the new ones are in the diamond pointing to the new facet address as well as updating the address within the deployment directory.
Trouble Shooting
If an upgrade needs to be reverted, see Revert a Diamond Upgrade.