You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: infrastructure/smart-contracts/README.md
+30-1
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,33 @@ To deploy on a local node start the node with `pnpm run local` and change the `d
22
22
- Change the proxy address to the contract that needs to be upgraded
23
23
- Change the contract name to the new contract version (`esXai` -> `esXai2`) in ` const esXai2 = await ethers.getContractFactory("esXai2");`
24
24
- Create a new upgrade command in `package.json`
25
-
- Run the script with `pnpm run upgrade-esxai`
25
+
- Run the script with `pnpm run upgrade-esxai`
26
+
27
+
28
+
## MultiSig deployments
29
+
30
+
### Upgrade an existing proxy to a new implementation
31
+
32
+
If the beacon proxy admin owner is a multisig we use `upgrades.upgradeProxy` anymore as it will throw the error `Caller is not owner` fro the beacon proxy contract.
33
+
For multisig deployments we need to call `upgrades.prepareUpgrade`, then take the implementation and build the transaction on the multisig contract.
34
+
If there is an initialize function to be called with the upgrade, we will call `upgradeAndCall` to the beacon proxy contract, this will require sending the encoded function call. For this we have a helper function `./utils/getUpgradeTransactionData.mjs`. It will create the encoded function call data to be sent with the multisig transaction.
35
+
From `upgrades.prepareUpgrade` we will get the new implementation address to upgrade to, we have to verify this implementation.
36
+
37
+
### Deploy a new contract
38
+
39
+
Deploy a new proxy will use the existing beacon proxy admin contract which is owned by the multisig, this wokrs the same no matter who the beacon proxy admin is.
0 commit comments