@skalenetwork/upgrade-tools 0.0.1-develop.1 → 0.0.1-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
1
|
# upgrade-tools
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Scripts to support upgrades of smart contracts. The package contains common used functions for writing hardhat scripts for smart contracts deployment and upgrade.
|
|
4
|
+
|
|
5
|
+
## Upgrade scripts
|
|
6
|
+
|
|
7
|
+
To write upgrade script import `upgrade` function.
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { upgrade } from "@skalenetwork/upgrade-tools"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then call it with parameters below:
|
|
14
|
+
|
|
15
|
+
- `projectName` - project name
|
|
16
|
+
- `targetVersion` - version of smart contracts that can be upgraded by the script
|
|
17
|
+
- `getDeployedVersion` - a function to request current version from smart contracts
|
|
18
|
+
- `setVersion` - function that sets version to smart contracts
|
|
19
|
+
- `safeMockAccessRequirements` - list of smart contracts that requires ownership changing for successful upgrade (when EOA + SafeMock are used during upgrade)
|
|
20
|
+
- `contractNamesToUpgrade` - list of smart contracts to upgrade
|
|
21
|
+
- `deployNewContracts` - optional - a function that deploys new smart contracts
|
|
22
|
+
- `initialize` - optional - a function that setup smart contracts after upgrade
|