@sentio/cli 3.7.1-rc.1 → 3.8.0-rc.1
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 +20 -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 +12 -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,25 @@ 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.rpc.sentio.xyz",
|
|
139203
|
+
explorerUrl: "https://devnet-explorer.sentio.xyz",
|
|
139204
|
+
// TODO: replace with actual AddressBook address once deployed on devnet
|
|
139205
|
+
addressBookAddress: "0x0000000000000000000000000000000000000000"
|
|
139206
|
+
};
|
|
139196
139207
|
function getSentioNetworkConfig(network) {
|
|
139197
139208
|
if (network === "testnet" || network === "7892101") {
|
|
139198
139209
|
return TESTNET_CONFIG;
|
|
139199
139210
|
}
|
|
139211
|
+
if (network === "devnet" || network === "7892201") {
|
|
139212
|
+
return DEVNET_CONFIG;
|
|
139213
|
+
}
|
|
139200
139214
|
if (network === "mainnet" || network === "789210") {
|
|
139201
139215
|
console.error(source_default.red("Sentio Network mainnet is not yet supported. Only testnet is available."));
|
|
139202
139216
|
process.exit(1);
|
|
139203
139217
|
}
|
|
139204
|
-
console.error(source_default.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`));
|
|
139218
|
+
console.error(source_default.red(`Invalid sentio network: ${network}. Only "testnet" or "devnet" is supported.`));
|
|
139205
139219
|
process.exit(1);
|
|
139206
139220
|
}
|
|
139207
139221
|
var ADDRESS_BOOK_ABI = [
|
|
@@ -139828,12 +139842,12 @@ function createUploadCommand() {
|
|
|
139828
139842
|
).option(
|
|
139829
139843
|
"--checkpoint <checkpoint...>",
|
|
139830
139844
|
'(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(
|
|
139845
|
+
).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
139846
|
"--required-chain-id <chain_id...>",
|
|
139833
139847
|
"(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
139848
|
).option(
|
|
139835
139849
|
"--no-platform",
|
|
139836
|
-
"Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet
|
|
139850
|
+
"Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet and devnet are supported."
|
|
139837
139851
|
).option(
|
|
139838
139852
|
"--ipfs-put-url <url>",
|
|
139839
139853
|
"IPFS upload endpoint (used with --no-platform)",
|
|
@@ -140223,7 +140237,7 @@ async function checkOrCreateProject(options, auth) {
|
|
|
140223
140237
|
console.error(
|
|
140224
140238
|
source_default.red(
|
|
140225
140239
|
`Project ${project?.slug} is a Sentio Network project. Please add the --sentio-network flag when uploading.
|
|
140226
|
-
Example: sentio upload --sentio-network testnet`
|
|
140240
|
+
Example: sentio upload --sentio-network testnet|devnet`
|
|
140227
140241
|
)
|
|
140228
140242
|
);
|
|
140229
140243
|
process.exit(1);
|
|
@@ -145475,7 +145489,7 @@ function formatTimestamp3(value) {
|
|
|
145475
145489
|
// src/commands/stop-processor.ts
|
|
145476
145490
|
init_cjs_shim();
|
|
145477
145491
|
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>",
|
|
145492
|
+
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
145493
|
try {
|
|
145480
145494
|
if (options.sentioNetwork) {
|
|
145481
145495
|
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,26 @@ 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.rpc.sentio.xyz',
|
|
26
|
+
explorerUrl: 'https://devnet-explorer.sentio.xyz',
|
|
27
|
+
// TODO: replace with actual AddressBook address once deployed on devnet
|
|
28
|
+
addressBookAddress: '0x0000000000000000000000000000000000000000'
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
export function getSentioNetworkConfig(network: string): SentioNetworkConfig {
|
|
24
32
|
if (network === 'testnet' || network === '7892101') {
|
|
25
33
|
return TESTNET_CONFIG
|
|
26
34
|
}
|
|
35
|
+
if (network === 'devnet' || network === '7892201') {
|
|
36
|
+
return DEVNET_CONFIG
|
|
37
|
+
}
|
|
27
38
|
if (network === 'mainnet' || network === '789210') {
|
|
28
39
|
console.error(chalk.red('Sentio Network mainnet is not yet supported. Only testnet is available.'))
|
|
29
40
|
process.exit(1)
|
|
30
41
|
}
|
|
31
|
-
console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`))
|
|
42
|
+
console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" or "devnet" is supported.`))
|
|
32
43
|
process.exit(1)
|
|
33
44
|
}
|
|
34
45
|
|