@cartesi/cli 0.15.1 → 0.16.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"baseCommand.d.ts","sourceRoot":"","sources":["../src/baseCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAU,MAAM,MAAM,CAAC;AAmB7C,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,OAAO,OAAO,IAAI,UAAU,CAAC,aAAa,CAClE,CAAC,OAAO,WAAW,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CACjD,CAAC;AACF,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,OAAO,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEhF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAClD,MAAM,WAAW,IAAI;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,8BAAsB,WAAW,CAAC,CAAC,SAAS,OAAO,OAAO,CAAE,SAAQ,OAAO;IACvE,SAAS,CAAC,KAAK,EAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,SAAS,CAAC,IAAI,EAAG,IAAI,CAAC,CAAC,CAAC,CAAC;cAET,eAAe,CAC3B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAe9B,SAAS,CAAC,cAAc,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAIpD,SAAS,CAAC,cAAc,IAAI,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AAE,MAAM,EACnB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAe9B,SAAS,CAAC,cAAc,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAIpD,SAAS,CAAC,cAAc,IAAI,IAAI,GAAG,SAAS;IAY5C,SAAS,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;cAItD,qBAAqB,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;cAKrD,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC;IAoCzC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAYrC"}
@@ -47,16 +47,26 @@ export class BaseCommand extends Command {
47
47
  AuthorityHistoryPairFactory: authorityHistoryPairFactoryAddress,
48
48
  CartesiDAppFactory: cartesiDAppFactoryAddress,
49
49
  DAppAddressRelay: dAppAddressRelayAddress,
50
+ EntryPointV06: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
51
+ EntryPointV07: "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
50
52
  ERC1155BatchPortal: erc1155BatchPortalAddress,
51
53
  ERC1155SinglePortal: erc1155SinglePortalAddress,
52
54
  ERC20Portal: erc20PortalAddress,
53
55
  ERC721Portal: erc721PortalAddress,
54
56
  EtherPortal: etherPortalAddress,
55
57
  InputBox: inputBoxAddress,
58
+ LightAccountFactory: "0x00004EC70002a32400f8ae005A26081065620D20",
56
59
  SelfHostedApplicationFactory: selfHostedApplicationFactoryAddress,
60
+ SimpleAccountFactory: "0x9406Cc6185a346906296840746125a0E44976454",
61
+ SmartAccountFactory: "0x000000a56Aaca3e9a4C479ea6b6CD0DbcB6634F5",
62
+ KernelFactoryV2: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3",
63
+ KernelFactoryV3: "0x6723b44Abeec4E71eBE3232BD5B455805baDD22f",
64
+ KernelFactoryV3_1: "0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419",
57
65
  TestToken: testTokenAddress,
58
66
  TestNFT: testNftAddress,
59
67
  TestMultiToken: testMultiTokenAddress,
68
+ VerifyingPaymasterV06: "0x28ec0633192d0cBd9E1156CE05D5FdACAcB93947",
69
+ VerifyingPaymasterV07: "0xc5c97885C67F7361aBAfD2B95067a5bBdA603608",
60
70
  };
61
71
  // get dapp address
62
72
  const applicationAddress = await this.getApplicationAddress();
@@ -6,7 +6,10 @@ export default class DeployBuild extends BaseCommand<typeof DeployBuild> {
6
6
  static flags: {
7
7
  platform: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
8
  };
9
+ static enableJsonFlag: boolean;
9
10
  private buildRollupsImage;
10
- run(): Promise<string>;
11
+ run(): Promise<{
12
+ image: string;
13
+ }>;
11
14
  }
12
15
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/build.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW,CAAC,OAAO,WAAW,CAAC;IACpE,MAAM,CAAC,OAAO,SAAmD;IAEjE,MAAM,CAAC,WAAW,SACoD;IAEtE,MAAM,CAAC,QAAQ,WAA2C;IAE1D,MAAM,CAAC,KAAK;;MAOV;YAEY,iBAAiB;IA6BlB,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;CAwBtC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/build.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW,CAAC,OAAO,WAAW,CAAC;IACpE,MAAM,CAAC,OAAO,SAAmD;IAEjE,MAAM,CAAC,WAAW,SACoD;IAEtE,MAAM,CAAC,QAAQ,WAA2C;IAE1D,MAAM,CAAC,KAAK;;MAOV;IAEF,OAAc,cAAc,UAAQ;YAEtB,iBAAiB;IA6BlB,GAAG;;;CAwBnB"}
@@ -45,7 +45,7 @@ class DeployBuild extends BaseCommand {
45
45
  title: "Application node Docker image",
46
46
  value: image,
47
47
  });
48
- return image;
48
+ return { image };
49
49
  }
50
50
  }
51
51
  DeployBuild.summary = "Build deployment Docker image of application.";
@@ -58,4 +58,5 @@ DeployBuild.flags = {
58
58
  description: "Select the target platform for the produced Docker image. It depends on the platform where the application node will be deployed.",
59
59
  }),
60
60
  };
61
+ DeployBuild.enableJsonFlag = true;
61
62
  export default DeployBuild;
@@ -5,6 +5,9 @@ export default class Run extends BaseCommand<typeof Run> {
5
5
  static examples: string[];
6
6
  static flags: {
7
7
  "block-time": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
+ "disable-explorer": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
9
+ "disable-bundler": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
10
+ "disable-paymaster": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
8
11
  "epoch-length": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
12
  "no-backend": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
10
13
  verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACpD,MAAM,CAAC,OAAO,SAA2B;IAEzC,MAAM,CAAC,WAAW,SAAmD;IAErE,MAAM,CAAC,QAAQ,WAA2C;IAE1D,MAAM,CAAC,KAAK;;;;;;MAwBV;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwHpC"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACpD,MAAM,CAAC,OAAO,SAA2B;IAEzC,MAAM,CAAC,WAAW,SAAmD;IAErE,MAAM,CAAC,QAAQ,WAA2C;IAE1D,MAAM,CAAC,KAAK;;;;;;;;;MA0CV;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmIpC"}
@@ -52,7 +52,17 @@ class Run extends BaseCommand {
52
52
  // anvil
53
53
  composeFiles.push("docker-compose-anvil.yaml");
54
54
  // explorer
55
- composeFiles.push("docker-compose-explorer.yaml");
55
+ if (!flags["disable-explorer"]) {
56
+ composeFiles.push("docker-compose-explorer.yaml");
57
+ }
58
+ // account abstraction
59
+ if (!flags["disable-bundler"]) {
60
+ composeFiles.push("docker-compose-bundler.yaml");
61
+ }
62
+ if (!flags["disable-paymaster"] && !flags["disable-bundler"]) {
63
+ // only add paymaster if bundler is enabled
64
+ composeFiles.push("docker-compose-paymaster.yaml");
65
+ }
56
66
  // load the no-backend compose file
57
67
  if (flags["no-backend"]) {
58
68
  composeFiles.push("docker-compose-host.yaml");
@@ -115,6 +125,21 @@ Run.flags = {
115
125
  description: "interval between blocks (in seconds)",
116
126
  default: 5,
117
127
  }),
128
+ "disable-explorer": Flags.boolean({
129
+ default: false,
130
+ description: "disable local explorer service to save machine resources",
131
+ summary: "disable explorer service",
132
+ }),
133
+ "disable-bundler": Flags.boolean({
134
+ default: false,
135
+ description: "disable local bundler service to save machine resources",
136
+ summary: "disable bundler service",
137
+ }),
138
+ "disable-paymaster": Flags.boolean({
139
+ default: false,
140
+ description: "disable local paymaster service to save machine resources",
141
+ summary: "disable paymaster service",
142
+ }),
118
143
  "epoch-length": Flags.integer({
119
144
  description: "length of an epoch (in blocks)",
120
145
  default: 720,
@@ -11,7 +11,7 @@ class Shell extends BaseCommand {
11
11
  const ext2 = path.join(containerDir, path.basename(ext2Path));
12
12
  const ramSize = "128Mi";
13
13
  const driveLabel = "root";
14
- const sdkImage = "cartesi/sdk:0.9.0"; // XXX: how to resolve sdk version?
14
+ const sdkImage = "cartesi/sdk:0.10.0"; // XXX: how to resolve sdk version?
15
15
  const args = [
16
16
  "run",
17
17
  "--interactive",
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  anvil:
3
- image: cartesi/sdk:0.9.0
3
+ image: cartesi/sdk:0.10.0
4
4
  command:
5
5
  [
6
6
  "devnet",
@@ -19,7 +19,7 @@ services:
19
19
  - 8545:8545
20
20
 
21
21
  dapp_deployer:
22
- image: cartesi/sdk:0.9.0
22
+ image: cartesi/sdk:0.10.0
23
23
  restart: on-failure
24
24
  depends_on:
25
25
  anvil:
@@ -0,0 +1,57 @@
1
+ services:
2
+ alto:
3
+ image: cartesi/sdk:0.10.0
4
+ command:
5
+ - "alto"
6
+ - "--entrypoints"
7
+ - "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789,0x0000000071727De22E5E9d8BAf0edAc6f37da032"
8
+ - "--log-level"
9
+ - "info"
10
+ - "--entrypoint-simulation-contract"
11
+ - "0x74Cb5e4eE81b86e70f9045036a1C5477de69eE87"
12
+ - "--rpc-url"
13
+ - "http://anvil:8545"
14
+ - "--min-executor-balance"
15
+ - "0"
16
+ - "--utility-private-key"
17
+ - "0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97"
18
+ - "--executor-private-keys"
19
+ - "0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6,0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356,0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e,0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba,0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a"
20
+ - "--max-block-range"
21
+ - "10000"
22
+ - "--safe-mode"
23
+ - "false"
24
+ - "--port"
25
+ - "4337"
26
+ - "--public-client-log-level"
27
+ - "error"
28
+ - "--wallet-client-log-level"
29
+ - "error"
30
+ - "--polling-interval"
31
+ - "100"
32
+ - "--enable-debug-endpoints"
33
+ prompt:
34
+ image: debian:bookworm-slim
35
+ environment:
36
+ PROMPT_TXT_06_BUNDLER: "Bundler running at http://localhost:${CARTESI_LISTEN_PORT}/bundler/rpc"
37
+
38
+ traefik-config-generator:
39
+ environment:
40
+ TRAEFIK_CONFIG_BUNDLER: |
41
+ http:
42
+ routers:
43
+ bundler:
44
+ rule: "PathPrefix(`/bundler`)"
45
+ middlewares:
46
+ - "remove-bundler-prefix"
47
+ service: bundler
48
+ middlewares:
49
+ remove-bundler-prefix:
50
+ replacePathRegex:
51
+ regex: "^/bundler/(.*)"
52
+ replacement: "/$1"
53
+ services:
54
+ bundler:
55
+ loadBalancer:
56
+ servers:
57
+ - url: "http://alto:4337"
@@ -8,8 +8,3 @@ services:
8
8
  retries: 5
9
9
  environment:
10
10
  - POSTGRES_PASSWORD=password
11
-
12
- database_creator:
13
- depends_on:
14
- database:
15
- condition: service_healthy
@@ -2,6 +2,9 @@ services:
2
2
  database_creator:
3
3
  image: postgres:15-alpine
4
4
  command: ["createdb", "squid"]
5
+ depends_on:
6
+ database:
7
+ condition: service_healthy
5
8
  environment:
6
9
  PGHOST: ${PGHOST:-database}
7
10
  PGPORT: ${PGPORT:-5432}
@@ -30,7 +33,6 @@ services:
30
33
  CHAIN_ID: ${CHAIN_ID:-31337}
31
34
  RPC_URL_31337: ${RPC_URL:-http://anvil:8545}
32
35
  BLOCK_CONFIRMATIONS_31337: 0
33
- GENESIS_BLOCK_31337: 22
34
36
  DB_NAME: ${PGDATABASE:-squid}
35
37
  DB_PORT: ${PGPORT:-5432}
36
38
  DB_HOST: ${PGHOST:-database}
@@ -0,0 +1,33 @@
1
+ services:
2
+ mock-verifying-paymaster:
3
+ image: cartesi/sdk:0.10.0
4
+ command: "mock-verifying-paymaster"
5
+ environment:
6
+ - ALTO_RPC=http://alto:4337
7
+ - ANVIL_RPC=http://anvil:8545
8
+
9
+ prompt:
10
+ image: debian:bookworm-slim
11
+ environment:
12
+ PROMPT_TXT_07_PAYMASTER: "Paymaster running at http://localhost:${CARTESI_LISTEN_PORT}/paymaster/"
13
+
14
+ traefik-config-generator:
15
+ environment:
16
+ TRAEFIK_CONFIG_PAYMASTER: |
17
+ http:
18
+ routers:
19
+ paymaster:
20
+ rule: "PathPrefix(`/paymaster`)"
21
+ middlewares:
22
+ - "remove-paymaster-prefix"
23
+ service: paymaster
24
+ middlewares:
25
+ remove-paymaster-prefix:
26
+ replacePathRegex:
27
+ regex: "^/paymaster/(.*)"
28
+ replacement: "/$1"
29
+ services:
30
+ paymaster:
31
+ loadBalancer:
32
+ servers:
33
+ - url: "http://mock-verifying-paymaster:3000"
@@ -222,6 +222,27 @@
222
222
  "multiple": false,
223
223
  "type": "option"
224
224
  },
225
+ "disable-explorer": {
226
+ "description": "disable local explorer service to save machine resources",
227
+ "name": "disable-explorer",
228
+ "summary": "disable explorer service",
229
+ "allowNo": false,
230
+ "type": "boolean"
231
+ },
232
+ "disable-bundler": {
233
+ "description": "disable local bundler service to save machine resources",
234
+ "name": "disable-bundler",
235
+ "summary": "disable bundler service",
236
+ "allowNo": false,
237
+ "type": "boolean"
238
+ },
239
+ "disable-paymaster": {
240
+ "description": "disable local paymaster service to save machine resources",
241
+ "name": "disable-paymaster",
242
+ "summary": "disable paymaster service",
243
+ "allowNo": false,
244
+ "type": "boolean"
245
+ },
225
246
  "epoch-length": {
226
247
  "description": "length of an epoch (in blocks)",
227
248
  "name": "epoch-length",
@@ -311,6 +332,13 @@
311
332
  "<%= config.bin %> <%= command.id %>"
312
333
  ],
313
334
  "flags": {
335
+ "json": {
336
+ "description": "Format output as json.",
337
+ "helpGroup": "GLOBAL",
338
+ "name": "json",
339
+ "allowNo": false,
340
+ "type": "boolean"
341
+ },
314
342
  "platform": {
315
343
  "description": "Select the target platform for the produced Docker image. It depends on the platform where the application node will be deployed.",
316
344
  "name": "platform",
@@ -332,6 +360,7 @@
332
360
  "pluginType": "core",
333
361
  "strict": true,
334
362
  "summary": "Build deployment Docker image of application.",
363
+ "enableJsonFlag": true,
335
364
  "isESM": true,
336
365
  "relativePath": [
337
366
  "dist",
@@ -883,5 +912,5 @@
883
912
  ]
884
913
  }
885
914
  },
886
- "version": "0.15.1"
915
+ "version": "0.16.0"
887
916
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartesi/cli",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "Cartesi CLI",
5
5
  "author": "Danilo Tuler <tuler@pobox.com>",
6
6
  "bin": {
@@ -63,8 +63,8 @@
63
63
  "tslib": "^2.6.3",
64
64
  "typescript": "^5.5.4",
65
65
  "vitest": "^2.0.4",
66
- "@cartesi/eslint-config": "0.0.0",
67
66
  "@cartesi/devnet": "1.8.0",
67
+ "@cartesi/eslint-config": "0.0.0",
68
68
  "tsconfig": "0.0.0"
69
69
  },
70
70
  "oclif": {