@sentio/cli 3.7.1-rc.1 → 3.8.0-rc.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/lib/index.js +19 -6
- package/package.json +1 -1
- package/src/commands/stop-processor.ts +1 -1
- package/src/commands/upload.ts +3 -3
- package/src/config.ts +5 -1
- package/src/network.ts +11 -1
package/lib/index.js
CHANGED
|
@@ -109910,12 +109910,16 @@ function overrideConfigWithOptions(config, options) {
|
|
|
109910
109910
|
case "testnet":
|
|
109911
109911
|
config.sentioNetwork = "7892101";
|
|
109912
109912
|
break;
|
|
109913
|
+
case "devnet":
|
|
109914
|
+
config.sentioNetwork = "7892201";
|
|
109915
|
+
break;
|
|
109913
109916
|
case "7892101":
|
|
109917
|
+
case "7892201":
|
|
109914
109918
|
case "789210":
|
|
109915
109919
|
config.sentioNetwork = options.sentioNetwork;
|
|
109916
109920
|
break;
|
|
109917
109921
|
default:
|
|
109918
|
-
console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet or
|
|
109922
|
+
console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet, testnet or devnet is allowed`);
|
|
109919
109923
|
process.exit(1);
|
|
109920
109924
|
}
|
|
109921
109925
|
}
|
|
@@ -139193,15 +139197,24 @@ var TESTNET_CONFIG = {
|
|
|
139193
139197
|
explorerUrl: "https://testnet-explorer.sentio.xyz",
|
|
139194
139198
|
addressBookAddress: "0x94579F0e7873097279B48d7b15043698c522e47c"
|
|
139195
139199
|
};
|
|
139200
|
+
var DEVNET_CONFIG = {
|
|
139201
|
+
chainId: 7892201,
|
|
139202
|
+
rpcUrl: "https://sentio-devnet.test-rpc.sentio.xyz",
|
|
139203
|
+
explorerUrl: "https://devnet-explorer.sentio.xyz",
|
|
139204
|
+
addressBookAddress: "0xCfCE965429602b02b453477Cd8Bc7FEd5E8ffc14"
|
|
139205
|
+
};
|
|
139196
139206
|
function getSentioNetworkConfig(network) {
|
|
139197
139207
|
if (network === "testnet" || network === "7892101") {
|
|
139198
139208
|
return TESTNET_CONFIG;
|
|
139199
139209
|
}
|
|
139210
|
+
if (network === "devnet" || network === "7892201") {
|
|
139211
|
+
return DEVNET_CONFIG;
|
|
139212
|
+
}
|
|
139200
139213
|
if (network === "mainnet" || network === "789210") {
|
|
139201
139214
|
console.error(source_default.red("Sentio Network mainnet is not yet supported. Only testnet is available."));
|
|
139202
139215
|
process.exit(1);
|
|
139203
139216
|
}
|
|
139204
|
-
console.error(source_default.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`));
|
|
139217
|
+
console.error(source_default.red(`Invalid sentio network: ${network}. Only "testnet" or "devnet" is supported.`));
|
|
139205
139218
|
process.exit(1);
|
|
139206
139219
|
}
|
|
139207
139220
|
var ADDRESS_BOOK_ABI = [
|
|
@@ -139828,12 +139841,12 @@ function createUploadCommand() {
|
|
|
139828
139841
|
).option(
|
|
139829
139842
|
"--checkpoint <checkpoint...>",
|
|
139830
139843
|
'(Optional) Checkpoint(s) to rollback to, only available with --continue-from. Format: "chain_id:block_number" or "block_number" (uses default chain). Can specify multiple checkpoints.'
|
|
139831
|
-
).option("--debug", "(Optional) Run driver in debug mode").option("-y --silent-overwrite", "(Optional) Create project or upload new version without confirmation").option("--skip-build", "Skip build & pack file before uploading").option("--skip-gen", "Skip code generation.").option("--skip-deps", "Skip dependency enforce.").option("--example", "Generate example usage of the processor.").option("--walrus", "Store file in walrus").option("--path <path>", "override project path, default to current directory").option("--api-key <key>", "(Optional) Manually provide API key rather than use saved credential").option("--token <token>", "(Optional) Manually provide token rather than use saved credential").option("--host <host>", "(Optional) Override Sentio Host name").option("--num-workers <count>", "(Optional) Number of processor workers to start", myParseInt).option("--sentio-network <network>", "(Optional) Sentio network to connect to, can be testnet or mainnet").option(
|
|
139844
|
+
).option("--debug", "(Optional) Run driver in debug mode").option("-y --silent-overwrite", "(Optional) Create project or upload new version without confirmation").option("--skip-build", "Skip build & pack file before uploading").option("--skip-gen", "Skip code generation.").option("--skip-deps", "Skip dependency enforce.").option("--example", "Generate example usage of the processor.").option("--walrus", "Store file in walrus").option("--path <path>", "override project path, default to current directory").option("--api-key <key>", "(Optional) Manually provide API key rather than use saved credential").option("--token <token>", "(Optional) Manually provide token rather than use saved credential").option("--host <host>", "(Optional) Override Sentio Host name").option("--num-workers <count>", "(Optional) Number of processor workers to start", myParseInt).option("--sentio-network <network>", "(Optional) Sentio network to connect to, can be testnet, devnet or mainnet").option(
|
|
139832
139845
|
"--required-chain-id <chain_id...>",
|
|
139833
139846
|
"(Optional) Specify chain IDs required for the Sentio network. This option is only available when --sentio-network is used. If omitted, all chain IDs from the project configuration (contracts or network overrides) will be used."
|
|
139834
139847
|
).option(
|
|
139835
139848
|
"--no-platform",
|
|
139836
|
-
"Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet
|
|
139849
|
+
"Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet and devnet are supported."
|
|
139837
139850
|
).option(
|
|
139838
139851
|
"--ipfs-put-url <url>",
|
|
139839
139852
|
"IPFS upload endpoint (used with --no-platform)",
|
|
@@ -140223,7 +140236,7 @@ async function checkOrCreateProject(options, auth) {
|
|
|
140223
140236
|
console.error(
|
|
140224
140237
|
source_default.red(
|
|
140225
140238
|
`Project ${project?.slug} is a Sentio Network project. Please add the --sentio-network flag when uploading.
|
|
140226
|
-
Example: sentio upload --sentio-network testnet`
|
|
140239
|
+
Example: sentio upload --sentio-network testnet|devnet`
|
|
140227
140240
|
)
|
|
140228
140241
|
);
|
|
140229
140242
|
process.exit(1);
|
|
@@ -145475,7 +145488,7 @@ function formatTimestamp3(value) {
|
|
|
145475
145488
|
// src/commands/stop-processor.ts
|
|
145476
145489
|
init_cjs_shim();
|
|
145477
145490
|
function createStopProcessorCommand() {
|
|
145478
|
-
return new Command("stop").description("Stop a processor. Uses Sentio Network contract when --sentio-network is specified.").argument("<processorId>", "ID of the processor to stop").option("--sentio-network <network>",
|
|
145491
|
+
return new Command("stop").description("Stop a processor. Uses Sentio Network contract when --sentio-network is specified.").argument("<processorId>", "ID of the processor to stop").option("--sentio-network <network>", "Stop via Sentio Network contract (testnet or devnet)").option("--host <host>", "Override Sentio host").option("--api-key <key>", "Use an explicit API key instead of saved credentials").option("--token <token>", "Use an explicit bearer token instead of saved credentials").option("--project <owner/slug>", "Sentio project in <owner>/<slug> format").option("--owner <owner>", "Sentio project owner").option("--name <name>", "Sentio project name").option("-y, --yes", "Bypass confirmation").option("--no-delete", "Skip deleting the processor after stopping").showHelpAfterError().action(async (processorId, options) => {
|
|
145479
145492
|
try {
|
|
145480
145493
|
if (options.sentioNetwork) {
|
|
145481
145494
|
await runStopProcessorOnChain(processorId, options);
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export function createStopProcessorCommand() {
|
|
|
16
16
|
return new Command('stop')
|
|
17
17
|
.description('Stop a processor. Uses Sentio Network contract when --sentio-network is specified.')
|
|
18
18
|
.argument('<processorId>', 'ID of the processor to stop')
|
|
19
|
-
.option('--sentio-network <network>', 'Stop via Sentio Network contract (
|
|
19
|
+
.option('--sentio-network <network>', 'Stop via Sentio Network contract (testnet or devnet)')
|
|
20
20
|
.option('--host <host>', 'Override Sentio host')
|
|
21
21
|
.option('--api-key <key>', 'Use an explicit API key instead of saved credentials')
|
|
22
22
|
.option('--token <token>', 'Use an explicit bearer token instead of saved credentials')
|
package/src/commands/upload.ts
CHANGED
|
@@ -85,14 +85,14 @@ export function createUploadCommand() {
|
|
|
85
85
|
.option('--token <token>', '(Optional) Manually provide token rather than use saved credential')
|
|
86
86
|
.option('--host <host>', '(Optional) Override Sentio Host name')
|
|
87
87
|
.option('--num-workers <count>', '(Optional) Number of processor workers to start', myParseInt)
|
|
88
|
-
.option('--sentio-network <network>', '(Optional) Sentio network to connect to, can be testnet or mainnet')
|
|
88
|
+
.option('--sentio-network <network>', '(Optional) Sentio network to connect to, can be testnet, devnet or mainnet')
|
|
89
89
|
.option(
|
|
90
90
|
'--required-chain-id <chain_id...>',
|
|
91
91
|
'(Optional) Specify chain IDs required for the Sentio network. This option is only available when --sentio-network is used. If omitted, all chain IDs from the project configuration (contracts or network overrides) will be used.'
|
|
92
92
|
)
|
|
93
93
|
.option(
|
|
94
94
|
'--no-platform',
|
|
95
|
-
'Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet
|
|
95
|
+
'Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet and devnet are supported.'
|
|
96
96
|
)
|
|
97
97
|
.option(
|
|
98
98
|
'--ipfs-put-url <url>',
|
|
@@ -562,7 +562,7 @@ async function checkOrCreateProject(options: YamlProjectConfig, auth: Auth) {
|
|
|
562
562
|
console.error(
|
|
563
563
|
chalk.red(
|
|
564
564
|
`Project ${project?.slug} is a Sentio Network project. Please add the --sentio-network flag when uploading.\n` +
|
|
565
|
-
`Example: sentio upload --sentio-network testnet`
|
|
565
|
+
`Example: sentio upload --sentio-network testnet|devnet`
|
|
566
566
|
)
|
|
567
567
|
)
|
|
568
568
|
process.exit(1)
|
package/src/config.ts
CHANGED
|
@@ -115,12 +115,16 @@ export function overrideConfigWithOptions(config: YamlProjectConfig, options: an
|
|
|
115
115
|
case 'testnet':
|
|
116
116
|
config.sentioNetwork = '7892101'
|
|
117
117
|
break
|
|
118
|
+
case 'devnet':
|
|
119
|
+
config.sentioNetwork = '7892201'
|
|
120
|
+
break
|
|
118
121
|
case '7892101':
|
|
122
|
+
case '7892201':
|
|
119
123
|
case '789210':
|
|
120
124
|
config.sentioNetwork = options.sentioNetwork
|
|
121
125
|
break
|
|
122
126
|
default:
|
|
123
|
-
console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet or
|
|
127
|
+
console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet, testnet or devnet is allowed`)
|
|
124
128
|
process.exit(1)
|
|
125
129
|
}
|
|
126
130
|
}
|
package/src/network.ts
CHANGED
|
@@ -20,15 +20,25 @@ const TESTNET_CONFIG: SentioNetworkConfig = {
|
|
|
20
20
|
addressBookAddress: '0x94579F0e7873097279B48d7b15043698c522e47c'
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const DEVNET_CONFIG: SentioNetworkConfig = {
|
|
24
|
+
chainId: 7892201,
|
|
25
|
+
rpcUrl: 'https://sentio-devnet.test-rpc.sentio.xyz',
|
|
26
|
+
explorerUrl: 'https://devnet-explorer.sentio.xyz',
|
|
27
|
+
addressBookAddress: '0xCfCE965429602b02b453477Cd8Bc7FEd5E8ffc14'
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
export function getSentioNetworkConfig(network: string): SentioNetworkConfig {
|
|
24
31
|
if (network === 'testnet' || network === '7892101') {
|
|
25
32
|
return TESTNET_CONFIG
|
|
26
33
|
}
|
|
34
|
+
if (network === 'devnet' || network === '7892201') {
|
|
35
|
+
return DEVNET_CONFIG
|
|
36
|
+
}
|
|
27
37
|
if (network === 'mainnet' || network === '789210') {
|
|
28
38
|
console.error(chalk.red('Sentio Network mainnet is not yet supported. Only testnet is available.'))
|
|
29
39
|
process.exit(1)
|
|
30
40
|
}
|
|
31
|
-
console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`))
|
|
41
|
+
console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" or "devnet" is supported.`))
|
|
32
42
|
process.exit(1)
|
|
33
43
|
}
|
|
34
44
|
|