Skip to content

Commit 7570625

Browse files
committed
fixup! feat(cli): switching back chainId from 13370 to 31337
1 parent 150b85e commit 7570625

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

apps/cli/src/wallet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {
66
publicActions,
77
walletActions,
88
} from "viem";
9-
import { cannon } from "viem/chains";
9+
import { anvil } from "viem/chains";
1010
import { getProjectName } from "./base.js";
1111
import { PREFERRED_PORT } from "./config.js";
1212
import { getProjectPort } from "./exec/rollups.js";
1313

1414
export const cartesi = defineChain({
15-
...cannon,
15+
...anvil,
1616
name: "Cartesi Devnet",
1717
testnet: true,
1818
});

apps/cli/wagmi.config.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import { type Plugin, defineConfig } from "@wagmi/cli";
22
import { readFileSync, readdirSync } from "node:fs";
33
import path from "node:path";
44

5-
interface CannonOptions {
5+
interface DeploymentsOptions {
66
directory: string;
77
includes?: RegExp[];
88
excludes?: RegExp[];
99
}
1010

11-
const shouldIncludeFile = (name: string, config: CannonOptions): boolean => {
11+
const shouldIncludeFile = (
12+
name: string,
13+
config: DeploymentsOptions,
14+
): boolean => {
1215
if (config.excludes) {
1316
// if there is a list of excludes, then if the name matches any of them, then exclude
1417
for (const exclude of config.excludes) {
@@ -30,11 +33,11 @@ const shouldIncludeFile = (name: string, config: CannonOptions): boolean => {
3033
return true;
3134
};
3235

33-
const cannonDeployments = (config: CannonOptions): Plugin => {
36+
const deployments = (config: DeploymentsOptions): Plugin => {
3437
return {
35-
name: "cannon",
38+
name: "cartesi",
3639
contracts: () => {
37-
// list all files exported by cannon in directory
40+
// list all files exported by devnet in directory
3841
const files = readdirSync(config.directory).filter((file) =>
3942
shouldIncludeFile(file, config),
4043
);
@@ -60,7 +63,7 @@ const cannonDeployments = (config: CannonOptions): Plugin => {
6063
export default defineConfig({
6164
out: "src/contracts.ts",
6265
plugins: [
63-
cannonDeployments({
66+
deployments({
6467
directory: "node_modules/@cartesi/devnet/deployments",
6568
}),
6669
],

0 commit comments

Comments
 (0)