@sentio/cli 4.2.4-rc.1 → 4.3.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
@@ -11557,12 +11557,16 @@ function overrideConfigWithOptions(config, options) {
11557
11557
  case "testnet-v2":
11558
11558
  config.sentioNetwork = "7892102";
11559
11559
  break;
11560
+ case "devnet":
11561
+ config.sentioNetwork = "7892301";
11562
+ break;
11560
11563
  case "7892102":
11564
+ case "7892301":
11561
11565
  case "789210":
11562
11566
  config.sentioNetwork = options.sentioNetwork;
11563
11567
  break;
11564
11568
  default:
11565
- console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet or testnet is allowed`);
11569
+ console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet, testnet or devnet is allowed`);
11566
11570
  process.exit(1);
11567
11571
  }
11568
11572
  }
@@ -53673,7 +53677,7 @@ async function execPackageManager(args, stepName, options) {
53673
53677
  return execStep([pm, ...args], stepName, options, "(can be skipped with --skip-deps)");
53674
53678
  }
53675
53679
  //#endregion
53676
- //#region ../../node_modules/.pnpm/@sentio+chain@3.4.35/node_modules/@sentio/chain/dist/chain-id.js
53680
+ //#region ../../node_modules/.pnpm/@sentio+chain@3.4.36/node_modules/@sentio/chain/dist/chain-id.js
53677
53681
  var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
53678
53682
  Object.defineProperty(exports, "__esModule", { value: true });
53679
53683
  exports.ChainIdToType = exports.ChainTypeToChainId = exports.ChainId = exports.NonEthChainId = exports.BTCChainId = exports.StarknetChainId = exports.CosmosChainId = exports.FuelChainId = exports.SolanaChainId = exports.SuiChainId = exports.AptosChainId = exports.EthChainId = exports.ChainType = void 0;
@@ -53850,7 +53854,7 @@ var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
53850
53854
  }
53851
53855
  }));
53852
53856
  //#endregion
53853
- //#region ../../node_modules/.pnpm/@sentio+chain@3.4.35/node_modules/@sentio/chain/dist/chain-info.js
53857
+ //#region ../../node_modules/.pnpm/@sentio+chain@3.4.36/node_modules/@sentio/chain/dist/chain-info.js
53854
53858
  var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
53855
53859
  Object.defineProperty(exports, "__esModule", { value: true });
53856
53860
  exports.ChainInfo = exports.NonEthChainInfo = exports.CosmosChainInfo = exports.StarknetChainInfo = exports.FuelChainInfo = exports.SuiChainInfo = exports.SolanaChainInfo = exports.AptosChainInfo = exports.BTCChainInfo = exports.EthChainInfo = exports.EthVariation = exports.ExplorerApiType = void 0;
@@ -55063,8 +55067,8 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
55063
55067
  tokenSymbol: "ETH",
55064
55068
  tokenDecimals: 18,
55065
55069
  explorerApiType: ExplorerApiType.BLOCKSCOUT,
55066
- explorerUrl: "https://devnet2-explorer.sentio.xyz",
55067
- blockscoutUrl: "https://devnet2-explorer.sentio.xyz",
55070
+ explorerUrl: "https://devnet-explorer.sentio.xyz",
55071
+ blockscoutUrl: "https://devnet-explorer.sentio.xyz",
55068
55072
  lightIcon: "https://assets.sentio.xyz/chains/sentio.svg",
55069
55073
  darkIcon: "https://assets.sentio.xyz/chains/sentio-dark.svg"
55070
55074
  },
@@ -55494,7 +55498,7 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
55494
55498
  }
55495
55499
  }));
55496
55500
  //#endregion
55497
- //#region ../../node_modules/.pnpm/@sentio+chain@3.4.35/node_modules/@sentio/chain/dist/chain-name.js
55501
+ //#region ../../node_modules/.pnpm/@sentio+chain@3.4.36/node_modules/@sentio/chain/dist/chain-name.js
55498
55502
  var require_chain_name = /* @__PURE__ */ __commonJSMin(((exports) => {
55499
55503
  Object.defineProperty(exports, "__esModule", { value: true });
55500
55504
  exports.getChainName = getChainName;
@@ -169626,14 +169630,21 @@ const TESTNET_CONFIG = {
169626
169630
  explorerUrl: "https://testnet-explorer.sentio.xyz",
169627
169631
  addressBookAddress: "0xb7e9E56DFC27bcfA63698F2F5890e186426A0123"
169628
169632
  };
169633
+ const DEVNET_CONFIG = {
169634
+ chainId: 7892301,
169635
+ rpcUrl: "https://sentio-devnet.test-rpc.sentio.xyz",
169636
+ explorerUrl: "https://devnet-explorer.sentio.xyz",
169637
+ addressBookAddress: "0xb7e9E56DFC27bcfA63698F2F5890e186426A0123"
169638
+ };
169629
169639
  function getSentioNetworkConfig(network, addressBookOverride) {
169630
169640
  let config;
169631
169641
  if (network === "testnet" || network === "testnet-v2" || network === "7892102") config = TESTNET_CONFIG;
169642
+ else if (network === "devnet" || network === "7892301") config = DEVNET_CONFIG;
169632
169643
  else if (network === "mainnet" || network === "789210") {
169633
- console.error(chalk.red("Sentio Network mainnet is not yet supported. Only testnet is available."));
169644
+ console.error(chalk.red("Sentio Network mainnet is not yet supported. Only testnet and devnet are available."));
169634
169645
  process.exit(1);
169635
169646
  } else {
169636
- console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`));
169647
+ console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" and "devnet" are supported.`));
169637
169648
  process.exit(1);
169638
169649
  }
169639
169650
  if (addressBookOverride) {
@@ -170147,7 +170158,7 @@ function myParseInt(value, dummyPrevious) {
170147
170158
  return parsedValue;
170148
170159
  }
170149
170160
  function createUploadCommand() {
170150
- 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) => {
170161
+ 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, 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. Supported networks: testnet, devnet.").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) => {
170151
170162
  const processorConfig = loadProcessorConfig(options.path);
170152
170163
  overrideConfigWithOptions(processorConfig, options);
170153
170164
  if (options.path) process.chdir(options.path);
@@ -184454,7 +184465,7 @@ function formatTimestamp(value) {
184454
184465
  //#endregion
184455
184466
  //#region src/commands/stop-processor.ts
184456
184467
  function createStopProcessorCommand() {
184457
- 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) => {
184468
+ 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 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) => {
184458
184469
  try {
184459
184470
  if (options.sentioNetwork) await runStopProcessorOnChain(processorId, options);
184460
184471
  else await runProcessorStop(processorId, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/cli",
3
- "version": "4.2.4-rc.1",
3
+ "version": "4.3.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)')
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')
@@ -85,17 +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(
89
- '--sentio-network <network>',
90
- '(Optional) Sentio network to connect to, can be testnet or mainnet'
91
- )
88
+ .option('--sentio-network <network>', '(Optional) Sentio network to connect to, can be testnet, devnet or mainnet')
92
89
  .option(
93
90
  '--required-chain-id <chain_id...>',
94
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.'
95
92
  )
96
93
  .option(
97
94
  '--no-platform',
98
- 'Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Only testnet is supported.'
95
+ 'Upload processor directly to Sentio Network without platform support. Requires $PRIVATE_KEY env var. Supported networks: testnet, devnet.'
99
96
  )
100
97
  .option(
101
98
  '--ipfs-put-url <url>',
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 or mainnet
37
+ sentioNetwork?: string // Sentio network to connect to, can be testnet, devnet or mainnet
38
38
  requiredChainIds?: string[]
39
39
  }
40
40
 
@@ -116,14 +116,16 @@ export function overrideConfigWithOptions(config: YamlProjectConfig, options: an
116
116
  case 'testnet-v2':
117
117
  config.sentioNetwork = '7892102'
118
118
  break
119
+ case 'devnet':
120
+ config.sentioNetwork = '7892301'
121
+ break
119
122
  case '7892102':
123
+ case '7892301':
120
124
  case '789210':
121
125
  config.sentioNetwork = options.sentioNetwork
122
126
  break
123
127
  default:
124
- console.error(
125
- `Invalid sentio network: ${options.sentioNetwork}, only mainnet or testnet is allowed`
126
- )
128
+ console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet, testnet or devnet is allowed`)
127
129
  process.exit(1)
128
130
  }
129
131
  }
package/src/network.ts CHANGED
@@ -26,19 +26,34 @@ const TESTNET_CONFIG: SentioNetworkConfig = {
26
26
  addressBookAddress: '0xb7e9E56DFC27bcfA63698F2F5890e186426A0123'
27
27
  }
28
28
 
29
+ // Sentio Network devnet — chain id 7892301. This replaced the original devnet
30
+ // (7892201), which has been decommissioned, and inherited its hosts: the RPC is
31
+ // sentio-devnet.test-rpc.sentio.xyz and the explorer devnet-explorer.sentio.xyz.
32
+ // `sentio-devnet2` is NOT a thing — that hostname is unrouted and answers
33
+ // "unknown network slug". Same as testnet-v2 taking over the plain testnet hosts.
34
+ //
35
+ // Contracts are deployed deterministically, so every module proxy — and the
36
+ // AddressBook itself — sits at the same address as on testnet. The one exception
37
+ // is `sentio_token`, which here is the WETH9 predeploy; it resolves through the
38
+ // AddressBook like everything else, so nothing in this file needs to know.
39
+ const DEVNET_CONFIG: SentioNetworkConfig = {
40
+ chainId: 7892301,
41
+ rpcUrl: 'https://sentio-devnet.test-rpc.sentio.xyz',
42
+ explorerUrl: 'https://devnet-explorer.sentio.xyz',
43
+ addressBookAddress: '0xb7e9E56DFC27bcfA63698F2F5890e186426A0123'
44
+ }
45
+
29
46
  export function getSentioNetworkConfig(network: string, addressBookOverride?: string): SentioNetworkConfig {
30
47
  let config: SentioNetworkConfig
31
48
  if (network === 'testnet' || network === 'testnet-v2' || network === '7892102') {
32
49
  config = TESTNET_CONFIG
50
+ } else if (network === 'devnet' || network === '7892301') {
51
+ config = DEVNET_CONFIG
33
52
  } else if (network === 'mainnet' || network === '789210') {
34
- console.error(
35
- chalk.red('Sentio Network mainnet is not yet supported. Only testnet is available.')
36
- )
53
+ console.error(chalk.red('Sentio Network mainnet is not yet supported. Only testnet and devnet are available.'))
37
54
  process.exit(1)
38
55
  } else {
39
- console.error(
40
- chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`)
41
- )
56
+ console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" and "devnet" are supported.`))
42
57
  process.exit(1)
43
58
  }
44
59