Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"source.organizeImports": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "prettier.prettier-vscode"
}
}
7 changes: 3 additions & 4 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"semver": "^7.7.2",
"smol-toml": "^1.4.2",
"tmp": "^0.2.5",
"viem": "^2.37.6"
"viem": "^2.37.6",
"yaml": "^2.8.2"
},
"devDependencies": {
"@biomejs/biome": "catalog:",
Expand All @@ -56,7 +57,6 @@
"@types/tmp": "^0.2.6",
"@vitest/coverage-istanbul": "^3.2.4",
"@wagmi/cli": "^2.5.1",
"copyfiles": "^2.4.1",
"npm-run-all": "^4.1.5",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
Expand All @@ -66,13 +66,12 @@
"vitest": "^3.2.4"
},
"scripts": {
"build": "run-s clean codegen compile copy-files",
"build": "run-s clean codegen compile",
"clean": "rimraf dist",
"codegen": "run-p codegen:wagmi",
"codegen:wagmi": "wagmi generate",
"compile": "tsc -p tsconfig.build.json",
"postcompile": "chmod +x dist/index.js",
"copy-files": "copyfiles -u 1 \"src/**/*.yaml\" \"src/**/*.env\" \"src/**/*.txt\" dist",
"lint": "biome lint",
"posttest": "pnpm lint",
"test": "vitest"
Expand Down
36 changes: 36 additions & 0 deletions apps/cli/src/compose/anvil.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Config, Service } from "../types/compose.js";
import { DEFAULT_HEALTHCHECK } from "./common.js";

// Anvil service
export const ANVIL_SVC: Service = {
image: "cartesi/sdk:latest",
command: ["devnet"],
healthcheck: {
...DEFAULT_HEALTHCHECK,
test: ["CMD", "eth_isready"],
},
environment: {
ANVIL_IP_ADDR: "0.0.0.0",
},
};

export const ANVIL_PROXY_CFG: Config = {
name: "anvil-proxy",
content: `http:
routers:
anvil:
rule: "PathPrefix(\`/anvil\`)"
middlewares:
- "remove-anvil-prefix"
service: anvil
middlewares:
remove-anvil-prefix:
replacePathRegex:
regex: "^/anvil(.*)"
replacement: "$1"
services:
anvil:
loadBalancer:
servers:
- url: "http://anvil:8545"`,
};
Loading