@0xobelisk/sui-cli 1.2.0-pre.12 → 1.2.0-pre.121
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 +7 -7
- package/dist/dubhe.js +152 -51
- package/dist/dubhe.js.map +1 -1
- package/package.json +31 -19
- package/src/commands/build.ts +61 -18
- package/src/commands/call.ts +83 -83
- package/src/commands/checkBalance.ts +27 -12
- package/src/commands/convertJson.ts +85 -0
- package/src/commands/doctor.ts +1515 -0
- package/src/commands/faucet.ts +20 -10
- package/src/commands/generate.ts +61 -0
- package/src/commands/generateKey.ts +3 -2
- package/src/commands/index.ts +20 -11
- package/src/commands/info.ts +61 -0
- package/src/commands/loadMetadata.ts +68 -0
- package/src/commands/localnode.ts +22 -6
- package/src/commands/publish.ts +55 -7
- package/src/commands/query.ts +101 -101
- package/src/commands/shell.ts +208 -0
- package/src/commands/{configStore.ts → storeConfig.ts} +13 -5
- package/src/commands/switchEnv.ts +33 -0
- package/src/commands/test.ts +143 -31
- package/src/commands/upgrade.ts +46 -6
- package/src/commands/wait.ts +333 -22
- package/src/commands/watch.ts +9 -8
- package/src/dubhe.ts +12 -4
- package/src/utils/axios-downloader.ts +116 -0
- package/src/utils/callHandler.ts +118 -118
- package/src/utils/checkBalance.ts +6 -2
- package/src/utils/constants.ts +9 -0
- package/src/utils/generateAccount.ts +1 -1
- package/src/utils/index.ts +4 -3
- package/src/utils/metadataHandler.ts +17 -0
- package/src/utils/publishHandler.ts +408 -289
- package/src/utils/queryStorage.ts +141 -141
- package/src/utils/startNode.ts +115 -16
- package/src/utils/storeConfig.ts +50 -10
- package/src/utils/upgradeHandler.ts +218 -85
- package/src/utils/utils.ts +1041 -63
- package/src/commands/schemagen.ts +0 -40
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The Dubhe CLI is used for building and developing a Dubhe project.
|
|
|
4
4
|
|
|
5
5
|
It comes with
|
|
6
6
|
|
|
7
|
-
1. `
|
|
7
|
+
1. `generate`: Generate Move code from dubhe.config.ts
|
|
8
8
|
2. `publish`: Deploy your own project on the specified sui network.
|
|
9
9
|
3. `upgrade`: Upgrade your own project on the specified sui network.
|
|
10
10
|
4. `localnode`: Start a local Sui node for development
|
|
@@ -12,25 +12,25 @@ It comes with
|
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
-
We don
|
|
15
|
+
We don't recommend installing the CLI globally.
|
|
16
16
|
|
|
17
17
|
Instead, you should add the CLI as a dev dependency to your project (done automatically if you start from a starter kit using `pnpm create dubhe`), and use it with `pnpm build` inside your project directory.
|
|
18
18
|
|
|
19
19
|
## Using the CLI
|
|
20
20
|
|
|
21
|
-
Some commands expect a Dubhe config in the same folder where the CLI is being executed. This includes `
|
|
21
|
+
Some commands expect a Dubhe config in the same folder where the CLI is being executed. This includes `generate` and `publish`.
|
|
22
22
|
|
|
23
23
|
`faucet`, and `localnode` can be executed anywhere.
|
|
24
24
|
|
|
25
25
|
## Commands
|
|
26
26
|
|
|
27
|
-
### `
|
|
27
|
+
### `generate`
|
|
28
28
|
|
|
29
|
-
Generates Store libraries from a `dubhe.config.ts` file. See the [Store Config and `
|
|
29
|
+
Generates Store libraries from a `dubhe.config.ts` file. See the [Store Config and `generate` documentation](https://dubhe-docs.obelisk.build/dubhe/sui/store/config) in the Store section for more details.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
# in a folder with a dubhe.config.ts
|
|
33
|
-
dubhe
|
|
33
|
+
dubhe generate --config-path dubhe.config.ts
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### `publish`
|
|
@@ -58,7 +58,7 @@ dubhe publish --network mainnet
|
|
|
58
58
|
|
|
59
59
|
Upgrade Dubhe contract project.
|
|
60
60
|
|
|
61
|
-
When you add a new schema or modify the system code, you need to upgrade the contract through the `upgrade` method. ([
|
|
61
|
+
When you add a new schema or modify the system code, you need to upgrade the contract through the `upgrade` method. ([Migration Guide](https://dubhe-docs.obelisk.build/dubhe/migration))
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
64
|
dubhe upgrade --network <network:mainnet/testnet/devnet/localnet>
|