- Determine if the upgraded facet has changed at all (logic, function signatures, etc.). If not, skip next step and continue to step 3.
- If the contract has changed, then use the version control system to go back to the desired state of the contract and build the entire repo to make sure that the
out
directory has the desired abi. - Checkout the
deployments/$CHAIN_ID/$TIMESTAMP/diamonds.json
file and find the facet to revert to its previous state. Make sure that the address of the facet recorded there is not the latest one. You can do this by looking at the historical version of this file through the version control system. - Configure the environment variables to carry out the reversion. Specifically set the following variables in the root
.env
file:
- Finally, run the following script: