@@ -5,10 +5,16 @@ Running the Truffle migrations in [`migrations/prod`](migrations/prod) or [`migr
5
5
This is the deployment process:
6
6
7
7
``` bash
8
- # The Secret Recovery Phrase for our deployment account.
9
- export MNEMONIC=...
8
+ # 1. Follow the installation instructions on README.md
10
9
11
- # Deploy the changes
10
+ # 2. Export the secret recovery phrase for the deployment account.
11
+ export MNEMONIC=$( cat path/to/mnemonic)
12
+
13
+ # 3. Make sure that third_party/pyth/multisig-wh-message-builder/keys/key.json
14
+ # has the proper operational key for interacting with the multisig. Please follow
15
+ # the corresponding notion doc for more information about the keys.
16
+
17
+ # 4. Deploy the changes
12
18
# You might need to repeat this script because of busy RPCs. Repeating would not cause any problem even
13
19
# if the changes are already made. Also, sometimes the gases are not adjusted and it will cause the tx to
14
20
# remain on the mempool for a long time (so there is no progress until timeout). Please update them with
@@ -50,37 +56,10 @@ Changes to the files in this directory should be commited as well.
50
56
51
57
# Upgrading the contract
52
58
53
- To upgrade the contract you should add a new migration file in the ` migrations/* ` directories increasing the migration number.
54
-
55
- It looks like so:
56
-
57
- ``` javascript
58
- require (" dotenv" ).config ({ path: " ../.env" });
59
-
60
- const PythUpgradable = artifacts .require (" PythUpgradable" );
61
-
62
- const { upgradeProxy } = require (" @openzeppelin/truffle-upgrades" );
63
-
64
- /**
65
- * Version <x.y.z>.
66
- *
67
- * Briefly describe the changelog here.
68
- */
69
- module .exports = async function (deployer ) {
70
- const proxy = await PythUpgradable .deployed ();
71
- await upgradeProxy (proxy .address , PythUpgradable, { deployer });
72
- };
73
- ```
74
-
75
- ** When changing the storage, you might need to disable the storage checks because Open Zeppelin is very conservative,
76
- and appending to the Pyth State struct is considered illegal.** Pyth ` _state ` variable is a Pyth State
77
- struct that contains all Pyth variables inside it. It is the last variable in the contract
78
- and is safe to append fields inside it. However, Open Zeppelin only allows appending variables
79
- in the contract surface and does not allow appending in the nested structs.
59
+ To upgrade the contract you should bump the version of the contract and the npm package to the new version and run the deployment
60
+ process described above. Please bump the version properly as described in [ the section below] ( #versioning ) .
80
61
81
- To disable security checks, you can add
82
- ` unsafeSkipStorageCheck: true ` option in ` upgradeProxy ` call. ** If you do such a thing,
83
- make sure that your change to the contract won't cause any collision** . For example:
62
+ ** When you are making changes to the storage, please make sure that your change to the contract won't cause any collision** . For example:
84
63
85
64
- Renaming a variable is fine.
86
65
- Changing a variable type to another type with the same size is ok.
0 commit comments