@sentio/cli 4.1.0 → 4.2.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/dist/index.js +68 -70
- package/package.json +1 -1
- package/src/commands/stop-processor.ts +1 -1
- package/src/commands/upload.ts +3 -3
- package/src/config.ts +2 -9
- package/src/network.ts +9 -22
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
|
|
11565
|
+
console.error(`Invalid sentio network: ${options.sentioNetwork}, only mainnet or testnet is allowed`);
|
|
11573
11566
|
process.exit(1);
|
|
11574
11567
|
}
|
|
11575
11568
|
}
|
|
@@ -53680,7 +53673,7 @@ async function execPackageManager(args, stepName, options) {
|
|
|
53680
53673
|
return execStep([pm, ...args], stepName, options, "(can be skipped with --skip-deps)");
|
|
53681
53674
|
}
|
|
53682
53675
|
//#endregion
|
|
53683
|
-
//#region ../../node_modules/.pnpm/@sentio+chain@3.4.
|
|
53676
|
+
//#region ../../node_modules/.pnpm/@sentio+chain@3.4.33/node_modules/@sentio/chain/dist/chain-id.js
|
|
53684
53677
|
var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
53685
53678
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53686
53679
|
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;
|
|
@@ -53738,7 +53731,6 @@ var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53738
53731
|
EthChainId["KARAK"] = "2410";
|
|
53739
53732
|
EthChainId["BEVM"] = "11501";
|
|
53740
53733
|
EthChainId["MEGAETH"] = "4326";
|
|
53741
|
-
EthChainId["MERLIN_MAINNET"] = "4200";
|
|
53742
53734
|
EthChainId["MANTLE"] = "5000";
|
|
53743
53735
|
EthChainId["BASE"] = "8453";
|
|
53744
53736
|
EthChainId["BASE_SEPOLIA"] = "84532";
|
|
@@ -53747,7 +53739,6 @@ var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53747
53739
|
EthChainId["PLASMA_TESTNET"] = "9746";
|
|
53748
53740
|
EthChainId["MONAD_TESTNET"] = "10143";
|
|
53749
53741
|
EthChainId["MONAD_MAINNET"] = "143";
|
|
53750
|
-
EthChainId["HOLESKY"] = "17000";
|
|
53751
53742
|
EthChainId["HOODI"] = "560048";
|
|
53752
53743
|
EthChainId["MODE"] = "34443";
|
|
53753
53744
|
EthChainId["ARBITRUM"] = "42161";
|
|
@@ -53774,6 +53765,9 @@ var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53774
53765
|
EthChainId["GOAT_MAINNET"] = "2345";
|
|
53775
53766
|
EthChainId["ARC_TESTNET"] = "5042002";
|
|
53776
53767
|
EthChainId["SENTIO_TESTNET"] = "7892101";
|
|
53768
|
+
EthChainId["SENTIO_TESTNET_V2"] = "7892102";
|
|
53769
|
+
EthChainId["SENTIO_DEVNET"] = "7892201";
|
|
53770
|
+
EthChainId["TRON"] = "728126428";
|
|
53777
53771
|
EthChainId["CUSTOM"] = "customized";
|
|
53778
53772
|
})(EthChainId || (exports.EthChainId = EthChainId = {}));
|
|
53779
53773
|
var AptosChainId;
|
|
@@ -53859,7 +53853,7 @@ var require_chain_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53859
53853
|
}
|
|
53860
53854
|
}));
|
|
53861
53855
|
//#endregion
|
|
53862
|
-
//#region ../../node_modules/.pnpm/@sentio+chain@3.4.
|
|
53856
|
+
//#region ../../node_modules/.pnpm/@sentio+chain@3.4.33/node_modules/@sentio/chain/dist/chain-info.js
|
|
53863
53857
|
var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
53864
53858
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53865
53859
|
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;
|
|
@@ -53886,6 +53880,7 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53886
53880
|
EthVariation[EthVariation["ZKSYNC"] = 3] = "ZKSYNC";
|
|
53887
53881
|
EthVariation[EthVariation["POLYGON_ZKEVM"] = 4] = "POLYGON_ZKEVM";
|
|
53888
53882
|
EthVariation[EthVariation["SUBSTRATE"] = 5] = "SUBSTRATE";
|
|
53883
|
+
EthVariation[EthVariation["TRON"] = 6] = "TRON";
|
|
53889
53884
|
})(EthVariation || (exports.EthVariation = EthVariation = {}));
|
|
53890
53885
|
/**
|
|
53891
53886
|
* EVM chains
|
|
@@ -53929,25 +53924,6 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53929
53924
|
lightIcon: "https://assets.sentio.xyz/chains/eth.svg",
|
|
53930
53925
|
darkIcon: "https://assets.sentio.xyz/chains/eth-dark.svg"
|
|
53931
53926
|
},
|
|
53932
|
-
[chain_id_1.EthChainId.HOLESKY]: {
|
|
53933
|
-
name: "Holesky",
|
|
53934
|
-
slug: "holesky",
|
|
53935
|
-
chainId: chain_id_1.EthChainId.HOLESKY,
|
|
53936
|
-
nativeChainId: 17e3,
|
|
53937
|
-
mainnetChainId: chain_id_1.EthChainId.ETHEREUM,
|
|
53938
|
-
variation: EthVariation.DEFAULT,
|
|
53939
|
-
priceTokenAddress: "0x0000000000000000000000000000000000000000",
|
|
53940
|
-
tokenAddress: "0x0000000000000000000000000000000000000000",
|
|
53941
|
-
wrappedTokenAddress: "0x94373a4919B3240D86eA41593D5eBa789FEF3848",
|
|
53942
|
-
tokenSymbol: "ETH",
|
|
53943
|
-
tokenDecimals: 18,
|
|
53944
|
-
explorerApiType: ExplorerApiType.ETHERSCAN_V2,
|
|
53945
|
-
explorerUrl: "https://holesky.etherscan.io",
|
|
53946
|
-
explorerApi: "https://api.etherscan.io/v2",
|
|
53947
|
-
blockscoutUrl: "https://eth-holesky.blockscout.com",
|
|
53948
|
-
lightIcon: "https://assets.sentio.xyz/chains/eth.svg",
|
|
53949
|
-
darkIcon: "https://assets.sentio.xyz/chains/eth-dark.svg"
|
|
53950
|
-
},
|
|
53951
53927
|
[chain_id_1.EthChainId.HOODI]: {
|
|
53952
53928
|
name: "Hoodi",
|
|
53953
53929
|
slug: "hoodi",
|
|
@@ -54588,22 +54564,6 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
54588
54564
|
explorerApi: "https://scan.bevm.io",
|
|
54589
54565
|
lightIcon: "https://assets.sentio.xyz/chains/bevm.svg"
|
|
54590
54566
|
},
|
|
54591
|
-
[chain_id_1.EthChainId.MERLIN_MAINNET]: {
|
|
54592
|
-
name: "Merlin Mainnet",
|
|
54593
|
-
slug: "merlin",
|
|
54594
|
-
chainId: chain_id_1.EthChainId.MERLIN_MAINNET,
|
|
54595
|
-
nativeChainId: 4200,
|
|
54596
|
-
variation: EthVariation.POLYGON_ZKEVM,
|
|
54597
|
-
priceTokenAddress: "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",
|
|
54598
|
-
tokenAddress: "0x0000000000000000000000000000000000000000",
|
|
54599
|
-
wrappedTokenAddress: "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",
|
|
54600
|
-
tokenSymbol: "BTC",
|
|
54601
|
-
tokenDecimals: 18,
|
|
54602
|
-
explorerUrl: "https://scan.merlinchain.io",
|
|
54603
|
-
explorerApiType: ExplorerApiType.L2_SCAN,
|
|
54604
|
-
explorerApi: "https://scan.merlinchain.io/api",
|
|
54605
|
-
lightIcon: "https://assets.sentio.xyz/chains/merlin.png"
|
|
54606
|
-
},
|
|
54607
54567
|
[chain_id_1.EthChainId.CHILIZ]: {
|
|
54608
54568
|
name: "Chiliz",
|
|
54609
54569
|
slug: "chiliz",
|
|
@@ -55110,7 +55070,7 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
55110
55070
|
},
|
|
55111
55071
|
[chain_id_1.EthChainId.SENTIO_TESTNET]: {
|
|
55112
55072
|
name: "Sentio testnet",
|
|
55113
|
-
slug: "sentio-testnet",
|
|
55073
|
+
slug: "sentio-testnet-v1",
|
|
55114
55074
|
chainId: chain_id_1.EthChainId.SENTIO_TESTNET,
|
|
55115
55075
|
nativeChainId: 7892101,
|
|
55116
55076
|
variation: EthVariation.DEFAULT,
|
|
@@ -55120,11 +55080,63 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
55120
55080
|
tokenSymbol: "ETH",
|
|
55121
55081
|
tokenDecimals: 18,
|
|
55122
55082
|
explorerApiType: ExplorerApiType.BLOCKSCOUT,
|
|
55083
|
+
explorerUrl: "https://testnet-v1-explorer.sentio.xyz",
|
|
55084
|
+
blockscoutUrl: "https://testnet-v1-explorer.sentio.xyz",
|
|
55085
|
+
lightIcon: "https://assets.sentio.xyz/chains/sentio.svg",
|
|
55086
|
+
darkIcon: "https://assets.sentio.xyz/chains/sentio-dark.svg"
|
|
55087
|
+
},
|
|
55088
|
+
[chain_id_1.EthChainId.SENTIO_TESTNET_V2]: {
|
|
55089
|
+
name: "Sentio testnet v2",
|
|
55090
|
+
slug: "sentio-testnet",
|
|
55091
|
+
chainId: chain_id_1.EthChainId.SENTIO_TESTNET_V2,
|
|
55092
|
+
nativeChainId: 7892102,
|
|
55093
|
+
variation: EthVariation.DEFAULT,
|
|
55094
|
+
priceTokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55095
|
+
tokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55096
|
+
wrappedTokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55097
|
+
tokenSymbol: "ETH",
|
|
55098
|
+
tokenDecimals: 18,
|
|
55099
|
+
explorerApiType: ExplorerApiType.BLOCKSCOUT,
|
|
55123
55100
|
explorerUrl: "https://testnet-explorer.sentio.xyz",
|
|
55124
55101
|
blockscoutUrl: "https://testnet-explorer.sentio.xyz",
|
|
55125
55102
|
lightIcon: "https://assets.sentio.xyz/chains/sentio.svg",
|
|
55126
55103
|
darkIcon: "https://assets.sentio.xyz/chains/sentio-dark.svg"
|
|
55127
55104
|
},
|
|
55105
|
+
[chain_id_1.EthChainId.SENTIO_DEVNET]: {
|
|
55106
|
+
name: "Sentio devnet",
|
|
55107
|
+
slug: "sentio-devnet",
|
|
55108
|
+
chainId: chain_id_1.EthChainId.SENTIO_DEVNET,
|
|
55109
|
+
nativeChainId: 7892201,
|
|
55110
|
+
variation: EthVariation.DEFAULT,
|
|
55111
|
+
priceTokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55112
|
+
tokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55113
|
+
wrappedTokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55114
|
+
tokenSymbol: "ETH",
|
|
55115
|
+
tokenDecimals: 18,
|
|
55116
|
+
explorerApiType: ExplorerApiType.BLOCKSCOUT,
|
|
55117
|
+
explorerUrl: "https://devnet-explorer.sentio.xyz",
|
|
55118
|
+
blockscoutUrl: "https://devnet-explorer.sentio.xyz",
|
|
55119
|
+
lightIcon: "https://assets.sentio.xyz/chains/sentio.svg",
|
|
55120
|
+
darkIcon: "https://assets.sentio.xyz/chains/sentio-dark.svg"
|
|
55121
|
+
},
|
|
55122
|
+
[chain_id_1.EthChainId.TRON]: {
|
|
55123
|
+
name: "Tron Mainnet",
|
|
55124
|
+
slug: "tron",
|
|
55125
|
+
additionalSlugs: ["tron-mainnet"],
|
|
55126
|
+
chainId: chain_id_1.EthChainId.TRON,
|
|
55127
|
+
nativeChainId: 728126428,
|
|
55128
|
+
variation: EthVariation.TRON,
|
|
55129
|
+
priceTokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55130
|
+
tokenAddress: "0x0000000000000000000000000000000000000000",
|
|
55131
|
+
wrappedTokenAddress: "0x891cdb91d149f23B1a45D9c5Ca78a88d0cB44C18",
|
|
55132
|
+
tokenSymbol: "TRX",
|
|
55133
|
+
tokenDecimals: 6,
|
|
55134
|
+
explorerUrl: "https://tronscan.org",
|
|
55135
|
+
explorerApiType: ExplorerApiType.UNKNOWN,
|
|
55136
|
+
explorerApi: "https://apilist.tronscanapi.com/api",
|
|
55137
|
+
lightIcon: "https://assets.sentio.xyz/chains/tron.svg",
|
|
55138
|
+
darkIcon: "https://assets.sentio.xyz/chains/tron-dark.svg"
|
|
55139
|
+
},
|
|
55128
55140
|
[chain_id_1.EthChainId.CUSTOM]: {
|
|
55129
55141
|
name: "Custom",
|
|
55130
55142
|
slug: "custom",
|
|
@@ -55533,7 +55545,7 @@ var require_chain_info = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
55533
55545
|
}
|
|
55534
55546
|
}));
|
|
55535
55547
|
//#endregion
|
|
55536
|
-
//#region ../../node_modules/.pnpm/@sentio+chain@3.4.
|
|
55548
|
+
//#region ../../node_modules/.pnpm/@sentio+chain@3.4.33/node_modules/@sentio/chain/dist/chain-name.js
|
|
55537
55549
|
var require_chain_name = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
55538
55550
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55539
55551
|
exports.getChainName = getChainName;
|
|
@@ -169599,33 +169611,19 @@ var Wallet = class Wallet extends BaseWallet {
|
|
|
169599
169611
|
//#region src/network.ts
|
|
169600
169612
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
169601
169613
|
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
169614
|
chainId: 7892102,
|
|
169609
169615
|
rpcUrl: "https://sentio-testnet-v2.rpc.sentio.xyz",
|
|
169610
|
-
explorerUrl: "https://testnet-
|
|
169616
|
+
explorerUrl: "https://testnet-explorer.sentio.xyz",
|
|
169611
169617
|
addressBookAddress: "0xb7e9E56DFC27bcfA63698F2F5890e186426A0123"
|
|
169612
169618
|
};
|
|
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
169619
|
function getSentioNetworkConfig(network, addressBookOverride) {
|
|
169620
169620
|
let config;
|
|
169621
|
-
if (network === "testnet" || network === "
|
|
169622
|
-
else if (network === "devnet" || network === "7892201") config = DEVNET_CONFIG;
|
|
169623
|
-
else if (network === "testnet-v2" || network === "7892102") config = TESTNET_V2_CONFIG;
|
|
169621
|
+
if (network === "testnet" || network === "testnet-v2" || network === "7892102") config = TESTNET_CONFIG;
|
|
169624
169622
|
else if (network === "mainnet" || network === "789210") {
|
|
169625
|
-
console.error(chalk.red("Sentio Network mainnet is not yet supported. Only testnet
|
|
169623
|
+
console.error(chalk.red("Sentio Network mainnet is not yet supported. Only testnet is available."));
|
|
169626
169624
|
process.exit(1);
|
|
169627
169625
|
} else {
|
|
169628
|
-
console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet"
|
|
169626
|
+
console.error(chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`));
|
|
169629
169627
|
process.exit(1);
|
|
169630
169628
|
}
|
|
169631
169629
|
if (addressBookOverride) {
|
|
@@ -170139,7 +170137,7 @@ function myParseInt(value, dummyPrevious) {
|
|
|
170139
170137
|
return parsedValue;
|
|
170140
170138
|
}
|
|
170141
170139
|
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
|
|
170140
|
+
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
170141
|
const processorConfig = loadProcessorConfig(options.path);
|
|
170144
170142
|
overrideConfigWithOptions(processorConfig, options);
|
|
170145
170143
|
if (options.path) process.chdir(options.path);
|
|
@@ -170432,7 +170430,7 @@ async function checkOrCreateProject(options, auth) {
|
|
|
170432
170430
|
process.exit(1);
|
|
170433
170431
|
}
|
|
170434
170432
|
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
|
|
170433
|
+
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
170434
|
process.exit(1);
|
|
170437
170435
|
}
|
|
170438
170436
|
return project?.id;
|
|
@@ -184376,7 +184374,7 @@ function formatTimestamp(value) {
|
|
|
184376
184374
|
//#endregion
|
|
184377
184375
|
//#region src/commands/stop-processor.ts
|
|
184378
184376
|
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
|
|
184377
|
+
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
184378
|
try {
|
|
184381
184379
|
if (options.sentioNetwork) await runStopProcessorOnChain(processorId, options);
|
|
184382
184380
|
else await runProcessorStop(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 (testnet
|
|
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')
|
package/src/commands/upload.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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 === '
|
|
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
|
|
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"
|
|
39
|
+
chalk.red(`Invalid sentio network: ${network}. Only "testnet" is supported.`)
|
|
53
40
|
)
|
|
54
41
|
process.exit(1)
|
|
55
42
|
}
|