Upgrading an asset-handler facet must be done following the next steps:
Set the environment variables in the .env file for the upgrade. Specifically set the variables:
Copy
Ask AI
DEPLOYMENT_OWNER_KEY=<YOUR_DEPLOYMENT_OWNER_KEY>FACET_TO_UPGRADE=<THE_NAME_OF_THE_FACET_CONTRACT_TO_UPGRADE>FACET_ADDRESS_TO_UPGRADE=<THE_ADDRESS_OF_THE_FACET_CONTRACT_TO_UPGRADE>DIAMOND_TO_UPGRADE=<THE_NAME_OF_THE_DIAMOND_AS_IT_IS_RECORDED_IN_THE_DEPLOYMENTS>RECORD_DEPLOYMENTS_FOR_ALL_CHAINS=<true/false> #true if testing in 31337 and recorded values are needed
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.