-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Replace ethers with viem #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3c9679d
0f3a118
5ca6f68
7f7af13
265596f
75e69ad
d51879f
334de83
b17080c
671dcea
6190229
c536c4c
f948523
28bcf40
f028108
c41f1fe
107c668
ccb62b4
d1b51c6
f4db5ab
5865209
41060b0
2de19c6
361bd1c
469df39
26b2c88
eae36f8
ba2136d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,5 +4,6 @@ | |
| "Etherspot", | ||
| "sidechains", | ||
| "Sparknet" | ||
| ] | ||
| ], | ||
| "claudeCodeChat.permissions.yoloMode": false | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,23 @@ | ||
| FROM node:18-alpine AS deps | ||
| # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | ||
| RUN apk add --no-cache libc6-compat | ||
| FROM oven/bun:1-alpine AS deps | ||
| RUN apk update && apk add --no-cache g++ nodejs npm musl make musl-dev python3 git py3-setuptools && rm -rf /var/cache/apk/* | ||
| WORKDIR /app | ||
| COPY package.json ./ | ||
| RUN npm install | ||
| COPY package.json bun.lock* ./ | ||
| RUN bun install --frozen-lockfile | ||
|
|
||
| FROM node:18-alpine AS builder | ||
| FROM oven/bun:1-alpine AS builder | ||
| ARG APP_ENV | ||
| WORKDIR /app | ||
| COPY . . | ||
| COPY --from=deps /app/node_modules ./node_modules | ||
| RUN npm run build | ||
| RUN bun run build | ||
|
|
||
| FROM node:18-alpine AS runner | ||
| FROM oven/bun:1-alpine AS runner | ||
| WORKDIR /usr/app | ||
| ARG APP_ENV | ||
| COPY --from=builder /app/build ./build | ||
| COPY ./migrations ./build/migrations | ||
| COPY package.json ./ | ||
| COPY --from=builder /app/config.json.default /usr/app/config.json | ||
| RUN npm install | ||
| USER root | ||
| ENV NODE_ENV="production" | ||
| CMD ["npm", "start"] | ||
| CMD ["bun", "start"] |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import { BigNumber } from "ethers"; | ||
| import { toHex } from 'viem'; | ||
|
|
||
| export const UnaccountedCost = BigNumber.from("45000").toHexString(); | ||
| export const UnaccountedCost = toHex(45000n); | ||
|
Comment on lines
+1
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) LGTM: BigNumber → viem toHex migration is correct.
🤖 Prompt for AI Agents |
||
|
|
||
| interface TokenInfo { | ||
| decimals: number; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Version bump is fine; update Node engine for Viem v2 compatibility.
Viem v2 targets modern Node runtimes. Keeping
"node": ">=16.0.0"is risky and may break at runtime. Recommend raising the minimum to 18+.Apply this change outside the selected range:
📝 Committable suggestion
🤖 Prompt for AI Agents