@sentio/cli 4.1.0-rc.1 → 4.2.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/dist/index.js CHANGED
@@ -11554,22 +11554,15 @@ function overrideConfigWithOptions(config, options) {
11554
11554
  config.sentioNetwork = "789210";
11555
11555
  break;
11556
11556
  case "testnet":
11557
- config.sentioNetwork = "7892101";
11558
- break;
11559
- case "devnet":
11560
- config.sentioNetwork = "7892201";
11561
- break;
11562
11557
  case "testnet-v2":
11563
11558
  config.sentioNetwork = "7892102";
11564
11559
  break;
11565
- case "7892101":
11566
- case "7892201":
11567
11560
  case "7892102":
11568
11561
  case "789210":
11569
11562
  config.sentioNetwork = options.sentioNetwork;
11570
11563
  break;
11571
11564
  default:
11572
- console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet, testnet, testnet-v2 or devnet is allowed`);
11565
+ console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet or testnet is allowed`);
11573
11566
  process.exit(1);
11574
11567
  }
11575
11568
  }
@@ -169599,33 +169592,19 @@ var Wallet = class Wallet extends BaseWallet {
169599
169592
  //#region src/network.ts
169600
169593
  var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
169601
169594
  const TESTNET_CONFIG = {
169602
- chainId: 7892101,
169603
- rpcUrl: "https://sentio-testnet.rpc.sentio.xyz",
169604
- explorerUrl: "https://testnet-explorer.sentio.xyz",
169605
- addressBookAddress: "0x092d795d42e23ecba5cc66927972be5c9980effb"
169606
- };
169607
- const TESTNET_V2_CONFIG = {
169608
169595
  chainId: 7892102,
169609
169596
  rpcUrl: "https://sentio-testnet-v2.rpc.sentio.xyz",
169610
- explorerUrl: "https://testnet-v2-explorer.sentio.xyz",
169597
+ explorerUrl: "https://testnet-explorer.sentio.xyz",
169611
169598
  addressBookAddress: "0xb7e9E56DFC27bcfA63698F2F5890e186426A0123"
169612
169599
  };
169613
- const DEVNET_CONFIG = {
169614
- chainId: 7892201,
169615
- rpcUrl: "https://sentio-devnet.test-rpc.sentio.xyz",
169616
- explorerUrl: "https://devnet-explorer.sentio.xyz",
169617
- addressBookAddress: "0xCfCE965429602b02b453477Cd8Bc7FEd5E8ffc14"
169618
- };
169619
169600
  function getSentioNetworkConfig(network, addressBookOverride) {
169620
169601
  let config;
169621
- if (network === "testnet" || network === "7892101") config = TESTNET_CONFIG;
169622
- else if (network === "devnet" || network === "7892201") config = DEVNET_CONFIG;
169623
- else if (network === "testnet-v2" || network === "7892102") config = TESTNET_V2_CONFIG;
169602
+ if (network === "testnet" || network === "testnet-v2" || network === "7892102") config = TESTNET_CONFIG;
169624
169603
  else if (network === "mainnet" || network === "789210") {
169625
- console.error(chalk.red("Sentio Network mainnet is not yet supported. Only testnet, testnet-v2 and devnet are available."));
169604
+ console.error(chalk.red("Sentio Network mainnet is not yet supported. Only testnet is available."));
169626
169605
  process.exit(1);
169627
169606
  } else {
169628
- console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet", "testnet-v2" or "devnet" is supported.`));
169607
+ console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`));
169629
169608
  process.exit(1);
169630
169609
  }
169631
169610
  if (addressBookOverride) {
@@ -170139,7 +170118,7 @@ function myParseInt(value, dummyPrevious) {
170139
170118
  return parsedValue;
170140
170119
  }
170141
170120
  function createUploadCommand() {
170142
- return new Command$5("upload").description("Upload processor to Sentio").option("--owner <owner>", "(Optional) Project owner. Platform mode: project owner username. --no-platform mode: on-chain owner address (0x...) — $PRIVATE_KEY then signs as an operator on the owner's behalf, requires Permissions.addOperator beforehand.").option("--name <name>", "(Optional) Override Project name").option("--continue-from <version>", "(Optional) Continue processing data from the specific processor version which will keeping the old data from previous version and will STOP that version IMMEDIATELY.", myParseInt).option("--checkpoint <checkpoint...>", "(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.").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, testnet-v2, devnet or mainnet").option("--required-chain-id <chain_id...>", "(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.").option("--no-platform", "Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet and devnet are supported.").option("--ipfs-put-url <url>", "IPFS upload endpoint (used with --no-platform)", "https://api.sentio.xyz/v1/ipfs/add").option("--address-book <address>", "(Optional) Override the default AddressBook contract address used to resolve on-chain contracts (used with --no-platform).").action(async (options, command) => {
170121
+ return new Command$5("upload").description("Upload processor to Sentio").option("--owner <owner>", "(Optional) Project owner. Platform mode: project owner username. --no-platform mode: on-chain owner address (0x...) — $PRIVATE_KEY then signs as an operator on the owner's behalf, requires Permissions.addOperator beforehand.").option("--name <name>", "(Optional) Override Project name").option("--continue-from <version>", "(Optional) Continue processing data from the specific processor version which will keeping the old data from previous version and will STOP that version IMMEDIATELY.", myParseInt).option("--checkpoint <checkpoint...>", "(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.").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("--required-chain-id <chain_id...>", "(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.").option("--no-platform", "Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet is supported.").option("--ipfs-put-url <url>", "IPFS upload endpoint (used with --no-platform)", "https://api.sentio.xyz/v1/ipfs/add").option("--address-book <address>", "(Optional) Override the default AddressBook contract address used to resolve on-chain contracts (used with --no-platform).").action(async (options, command) => {
170143
170122
  const processorConfig = loadProcessorConfig(options.path);
170144
170123
  overrideConfigWithOptions(processorConfig, options);
170145
170124
  if (options.path) process.chdir(options.path);
@@ -170432,7 +170411,7 @@ async function checkOrCreateProject(options, auth) {
170432
170411
  process.exit(1);
170433
170412
  }
170434
170413
  if (!options.sentioNetwork && project.sentioNetwork === true) {
170435
- console.error(chalk.red(`Project ${project?.slug} is a Sentio Network project. Please add the --sentio-network flag when uploading.\nExample: sentio upload --sentio-network testnet|testnet-v2|devnet`));
170414
+ console.error(chalk.red(`Project ${project?.slug} is a Sentio Network project. Please add the --sentio-network flag when uploading.\nExample: sentio upload --sentio-network testnet`));
170436
170415
  process.exit(1);
170437
170416
  }
170438
170417
  return project?.id;
@@ -184376,7 +184355,7 @@ function formatTimestamp(value) {
184376
184355
  //#endregion
184377
184356
  //#region src/commands/stop-processor.ts
184378
184357
  function createStopProcessorCommand() {
184379
- return new Command$5("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, testnet-v2 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").option("--address-book <address>", "(Optional) Override the default AddressBook contract address used to resolve on-chain contracts (used with --sentio-network).").showHelpAfterError().action(async (processorId, options) => {
184358
+ return new Command$5("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)").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").option("--address-book <address>", "(Optional) Override the default AddressBook contract address used to resolve on-chain contracts (used with --sentio-network).").showHelpAfterError().action(async (processorId, options) => {
184380
184359
  try {
184381
184360
  if (options.sentioNetwork) await runStopProcessorOnChain(processorId, options);
184382
184361
  else await runProcessorStop(processorId, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/cli",
3
- "version": "4.1.0-rc.1",
3
+ "version": "4.2.0-rc.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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 (testnet, testnet-v2 or devnet)')
19
+ .option('--sentio-network <network>', 'Stop via Sentio Network contract (testnet)')
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')
@@ -87,7 +87,7 @@ export function createUploadCommand() {
87
87
  .option('--num-workers <count>', '(Optional) Number of processor workers to start', myParseInt)
88
88
  .option(
89
89
  '--sentio-network <network>',
90
- '(Optional) Sentio network to connect to, can be testnet, testnet-v2, devnet or mainnet'
90
+ '(Optional) Sentio network to connect to, can be testnet or mainnet'
91
91
  )
92
92
  .option(
93
93
  '--required-chain-id <chain_id...>',
@@ -95,7 +95,7 @@ export function createUploadCommand() {
95
95
  )
96
96
  .option(
97
97
  '--no-platform',
98
- 'Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet and devnet are supported.'
98
+ 'Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet is supported.'
99
99
  )
100
100
  .option(
101
101
  '--ipfs-put-url <url>',
@@ -569,7 +569,7 @@ async function checkOrCreateProject(options: YamlProjectConfig, auth: Auth) {
569
569
  console.error(
570
570
  chalk.red(
571
571
  `Project ${project?.slug} is a Sentio Network project. Please add the --sentio-network flag when uploading.\n` +
572
- `Example: sentio upload --sentio-network testnet|testnet-v2|devnet`
572
+ `Example: sentio upload --sentio-network testnet`
573
573
  )
574
574
  )
575
575
  process.exit(1)
package/src/config.ts CHANGED
@@ -34,7 +34,7 @@ export interface YamlProjectConfig {
34
34
  silentOverwrite?: boolean
35
35
  variables?: Variable[]
36
36
  numWorkers?: number // Number of processor worker to start, default to 1
37
- sentioNetwork?: string // Sentio network to connect to, can be testnet, testnet-v2, devnet or mainnet
37
+ sentioNetwork?: string // Sentio network to connect to, can be testnet or mainnet
38
38
  requiredChainIds?: string[]
39
39
  }
40
40
 
@@ -113,23 +113,16 @@ export function overrideConfigWithOptions(config: YamlProjectConfig, options: an
113
113
  config.sentioNetwork = '789210'
114
114
  break
115
115
  case 'testnet':
116
- config.sentioNetwork = '7892101'
117
- break
118
- case 'devnet':
119
- config.sentioNetwork = '7892201'
120
- break
121
116
  case 'testnet-v2':
122
117
  config.sentioNetwork = '7892102'
123
118
  break
124
- case '7892101':
125
- case '7892201':
126
119
  case '7892102':
127
120
  case '789210':
128
121
  config.sentioNetwork = options.sentioNetwork
129
122
  break
130
123
  default:
131
124
  console.error(
132
- `Invalid sentio network: ${options.sentioNetwork}, only mainnet, testnet, testnet-v2 or devnet is allowed`
125
+ `Invalid sentio network: ${options.sentioNetwork}, only mainnet or testnet is allowed`
133
126
  )
134
127
  process.exit(1)
135
128
  }
package/src/network.ts CHANGED
@@ -13,43 +13,30 @@ interface SentioNetworkConfig {
13
13
  addressBookAddress: string
14
14
  }
15
15
 
16
+ // Sentio Network testnet — chain id 7892102 (formerly exposed as `testnet-v2`).
17
+ // The legacy testnet (7892101) and devnet have been removed; `testnet` is this
18
+ // network. `testnet-v2` is still accepted as an alias.
16
19
  const TESTNET_CONFIG: SentioNetworkConfig = {
17
- chainId: 7892101,
18
- rpcUrl: 'https://sentio-testnet.rpc.sentio.xyz',
19
- explorerUrl: 'https://testnet-explorer.sentio.xyz',
20
- addressBookAddress: '0x092d795d42e23ecba5cc66927972be5c9980effb'
21
- }
22
-
23
- const TESTNET_V2_CONFIG: SentioNetworkConfig = {
24
20
  chainId: 7892102,
21
+ // v2 is the primary testnet: it owns the canonical testnet-explorer.sentio.xyz
22
+ // (v1 → testnet-v1-explorer). The chain RPC keeps its -v2 host for now.
25
23
  rpcUrl: 'https://sentio-testnet-v2.rpc.sentio.xyz',
26
- explorerUrl: 'https://testnet-v2-explorer.sentio.xyz',
24
+ explorerUrl: 'https://testnet-explorer.sentio.xyz',
27
25
  addressBookAddress: '0xb7e9E56DFC27bcfA63698F2F5890e186426A0123'
28
26
  }
29
27
 
30
- const DEVNET_CONFIG: SentioNetworkConfig = {
31
- chainId: 7892201,
32
- rpcUrl: 'https://sentio-devnet.test-rpc.sentio.xyz',
33
- explorerUrl: 'https://devnet-explorer.sentio.xyz',
34
- addressBookAddress: '0xCfCE965429602b02b453477Cd8Bc7FEd5E8ffc14'
35
- }
36
-
37
28
  export function getSentioNetworkConfig(network: string, addressBookOverride?: string): SentioNetworkConfig {
38
29
  let config: SentioNetworkConfig
39
- if (network === 'testnet' || network === '7892101') {
30
+ if (network === 'testnet' || network === 'testnet-v2' || network === '7892102') {
40
31
  config = TESTNET_CONFIG
41
- } else if (network === 'devnet' || network === '7892201') {
42
- config = DEVNET_CONFIG
43
- } else if (network === 'testnet-v2' || network === '7892102') {
44
- config = TESTNET_V2_CONFIG
45
32
  } else if (network === 'mainnet' || network === '789210') {
46
33
  console.error(
47
- chalk.red('Sentio Network mainnet is not yet supported. Only testnet, testnet-v2 and devnet are available.')
34
+ chalk.red('Sentio Network mainnet is not yet supported. Only testnet is available.')
48
35
  )
49
36
  process.exit(1)
50
37
  } else {
51
38
  console.error(
52
- chalk.red(`Invalid sentio network: ${network}. Only "testnet", "testnet-v2" or "devnet" is supported.`)
39
+ chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`)
53
40
  )
54
41
  process.exit(1)
55
42
  }