Skip to content

Commit c2d3094

Browse files
committed
feat(cli): switching back chainId from 13370 to 31337
1 parent 6b5e745 commit c2d3094

4 files changed

Lines changed: 21 additions & 12 deletions

File tree

.changeset/neat-meals-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cartesi/cli": patch
3+
---
4+
5+
switching back chainId from 13370 to 31337

apps/cli/src/compose/explorer.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { anvil } from "viem/chains";
12
import type { ComposeFile, Config, Service } from "../types/compose.js";
23
import { DEFAULT_HEALTHCHECK } from "./common.js";
34

@@ -75,19 +76,21 @@ export const squidProcessorService = (options: ServiceOptions): Service => {
7576
const databasePassword = options.databasePassword;
7677
const databaseHost = options.databaseHost ?? "database";
7778
const databasePort = options.databasePort ?? 5432;
79+
const chain = anvil;
80+
const environment: Record<string, string> = {
81+
DB_HOST: databaseHost,
82+
DB_NAME: "explorer",
83+
DB_PASS: databasePassword,
84+
DB_PORT: databasePort.toString(),
85+
CHAIN_IDS: chain.id.toString(),
86+
};
87+
environment[`RPC_URL_${chain.id}`] = `http://anvil:8545`;
88+
environment[`BLOCK_CONFIRMATIONS_${chain.id}`] = "0";
89+
environment[`GENESIS_BLOCK_${chain.id}`] = "1";
7890

7991
return {
8092
image: `cartesi/rollups-explorer-api:${imageTag}`,
81-
environment: {
82-
DB_HOST: databaseHost,
83-
DB_NAME: "explorer",
84-
DB_PASS: databasePassword,
85-
DB_PORT: databasePort.toString(),
86-
CHAIN_IDS: "13370",
87-
RPC_URL_13370: "http://anvil:8545",
88-
BLOCK_CONFIRMATIONS_13370: 0,
89-
GENESIS_BLOCK_13370: 1,
90-
},
93+
environment,
9194
command: ["sqd", "process:prod"],
9295
depends_on: {
9396
database: { condition: "service_healthy" },

apps/cli/src/compose/node.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { anvil } from "viem/chains";
12
import {
23
daveAppFactoryAddress,
34
inputBoxAddress,
@@ -60,7 +61,7 @@ const service = (options: ServiceOptions): Service => {
6061
CARTESI_AUTH_MNEMONIC: mnemonic,
6162
CARTESI_BLOCKCHAIN_DEFAULT_BLOCK: defaultBlock,
6263
CARTESI_BLOCKCHAIN_HTTP_ENDPOINT: "http://anvil:8545",
63-
CARTESI_BLOCKCHAIN_ID: "13370",
64+
CARTESI_BLOCKCHAIN_ID: anvil.id.toString(),
6465
CARTESI_BLOCKCHAIN_WS_ENDPOINT: "ws://anvil:8545",
6566
CARTESI_CONTRACTS_DAVE_APP_FACTORY_ADDRESS: daveAppFactoryAddress,
6667
CARTESI_CONTRACTS_INPUT_BOX_ADDRESS: inputBoxAddress,

apps/cli/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class InvalidStringArrayError extends Error {
7373
*/
7474
const DEFAULT_FORMAT = "ext2";
7575
const DEFAULT_RAM = "128Mi";
76-
export const DEFAULT_SDK_VERSION = "0.12.0-alpha.30";
76+
export const DEFAULT_SDK_VERSION = "0.12.0-alpha.31";
7777
export const DEFAULT_SDK_IMAGE = "cartesi/sdk";
7878
export const PREFERRED_PORT = 6751;
7979

0 commit comments

Comments
 (0)