Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3c9679d
Release 3.1.1
vignesha22 Feb 17, 2025
0f3a118
Merge pull request #190 from etherspot/develop
nikhilkumar1612 Feb 20, 2025
5ca6f68
v3.1.2
vignesha22 Mar 7, 2025
7f7af13
Merge pull request #194 from etherspot/develop
vignesha22 Mar 17, 2025
265596f
Merge pull request #196 from etherspot/develop
vignesha22 Mar 25, 2025
75e69ad
Merge pull request #200 from etherspot/develop
vignesha22 Apr 2, 2025
d51879f
Merge pull request #204 from etherspot/develop
vignesha22 Apr 24, 2025
334de83
Bug Fix for CronJob and Whitelist on-chain (#206) (#207)
vignesha22 Apr 29, 2025
b17080c
Merge branch 'master' into chore/resolve-conflicts-on-develop
sankhavaramsaitulasiram Apr 29, 2025
671dcea
Merge pull request #209 from etherspot/chore/resolve-conflicts-on-dev…
vignesha22 Apr 29, 2025
6190229
Merge pull request #212 from etherspot/develop
nikhilkumar1612 May 6, 2025
c536c4c
Merge pull request #215 from etherspot/develop
vignesha22 May 23, 2025
f948523
Merge pull request #217 from etherspot/develop
vignesha22 May 23, 2025
28bcf40
Merge pull request #219 from etherspot/develop
vignesha22 Jun 6, 2025
f028108
Merge pull request #221 from etherspot/develop
vignesha22 Aug 5, 2025
c41f1fe
feat: Replace ethers with viem
ch4r10t33r Aug 23, 2025
107c668
Fix: bumped package version number
ch4r10t33r Aug 23, 2025
ccb62b4
changed as per feedback
vignesha22 Jul 27, 2023
d1b51c6
added tests and updated readme
vignesha22 Aug 2, 2023
f4db5ab
removed log
vignesha22 Sep 19, 2025
5865209
added transaction details
vignesha22 Sep 19, 2025
41060b0
changed based on feedback
Sep 23, 2025
2de19c6
updated changeLog file to reflect the changes done
Sep 23, 2025
361bd1c
removed unused code
vignesha22 Sep 23, 2025
469df39
changed as per feedback
vignesha22 Sep 23, 2025
26b2c88
changes as per feedback
vignesha22 Sep 23, 2025
eae36f8
changes as per feedback
vignesha22 Sep 23, 2025
ba2136d
changes as per feedback
vignesha22 Sep 23, 2025
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"Etherspot",
"sidechains",
"Sparknet"
]
],
"claudeCodeChat.permissions.yoloMode": false
}
8 changes: 8 additions & 0 deletions backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Changelog
## [4.2.0] - 2025-09-19
- Removed unused code in the repository
- Removed the mode 'erc20' on paymaster routes since it used pimlico paymaster(v1)
- Removed the usage on ethers for the paymaster routes and the usage on ethers is limited to only utils section
- Added viem package to replace ethers
- Changed the build version to use bun instead of node.js
- Changed the docker file to use bun image and build the arka backend

## [4.1.2] - 2025-06-05
- Fetch from coingecko only if coingecko-token-repository records are available else skip calling the api

Expand Down
18 changes: 8 additions & 10 deletions backend/Dockerfile
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"]
3,300 changes: 3,300 additions & 0 deletions backend/bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/indexer/ponder.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createConfig } from "@ponder/core";
import { http } from "viem";
import SupportedNetworks from "../config.json" assert { type: "json" };
import SupportedNetworks from "../config.json";
import { EtherspotPaymasterAbi } from "./EtherspotAbi";

export default createConfig({
Expand Down
21 changes: 11 additions & 10 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arka",
"version": "4.1.2",
"version": "4.2.0",
Copy link
Copy Markdown

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:

-  "engines": {
-    "node": ">=16.0.0"
-  },
+  "engines": {
+    "node": ">=18.0.0"
+  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"version": "4.2.0",
"version": "4.2.0",
- "engines": {
- "node": ">=16.0.0"
"engines": {
"node": ">=18.0.0"
},
🤖 Prompt for AI Agents
In backend/package.json around line 3, the current "version" bump left the
package.json engines requirement at an older Node minimum; update the "engines"
field to require Node 18 or newer (e.g. "node": ">=18.0.0") to ensure Viem v2
compatibility — if the engines field is absent, add it; also update any
CI/workflow files referencing the Node version to match the new minimum.

"description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software",
"type": "module",
"directories": {
Expand All @@ -10,16 +10,17 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"check:types": "tsc --noEmit",
"build": "esbuild `find src \\( -name '*.ts' \\)` --platform=node --outdir=build --resolve-extensions=.js && cp -r ./migrations ./build/",
"build": "bun build src/index.ts --outdir build --target node && cp -r ./migrations ./build/",
"build:docker:prod": "docker build . -t my-fastify-app --build-arg APP_ENV=production",
"start": "node build",
"migrate": "node scripts/migration.cjs",
"dev": "tsx watch src | pino-pretty --colorize",
"pretest": "npm run build",
"test": "jest"
"start": "bun build/index.js",
"migrate": "bun run scripts/migration.cjs",
"dev": "tsx watch src/index.ts | pino-pretty --colorize",
"pretest": "bun run build",
"test": "bun test",
"postinstall": "node -e \"try { require('esbuild/install') } catch (e) { console.log('Using JS fallback for esbuild') }\""
},
"engines": {
"node": ">=16.0.0"
"bun": ">=1.0.0"
},
"keywords": [
"nodejs",
Expand All @@ -39,7 +40,6 @@
"crypto": "^1.0.1",
"dotenv": "16.0.3",
"env-schema": "5.1.1",
"ethers": "5.7.2",
"fastify": "4.24.3",
"fastify-cron": "1.3.1",
"fastify-healthcheck": "4.4.0",
Expand All @@ -49,14 +49,15 @@
"node-fetch": "3.3.2",
"node-pg-migrate": "^7.4.0",
"pg": "^8.12.0",
"pg-hstore": "^2.3.4",
"postgrator": "^7.2.0",
"sequelize": "^6.37.3",
"sqlite": "5.1.1",
"sqlite3": "5.1.7-rc.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"umzug": "^3.8.1",
"viem": "2.7.6"
"viem": "2.27.0"
},
"devDependencies": {
"@babel/core": "7.23.2",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/abi/VerifyingPaymasterAbiV3.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions backend/src/constants/MultitokenPaymaster.ts
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

LGTM: BigNumber → viem toHex migration is correct.

toHex(45000n) preserves the previous hex form (0xafc8). No functional change. Consider naming this UnaccountedCostHex for clarity, but optional.

🤖 Prompt for AI Agents
In backend/src/constants/MultitokenPaymaster.ts around lines 1 to 3, the
exported constant UnaccountedCost is correctly migrated to viem's toHex(45000n)
but the name is ambiguous; rename it to UnaccountedCostHex (or add a new
UnaccountedCostHex alias and keep the old name deprecated) and update all
imports/usages across the codebase to use the new identifier (or keep the old
export forwarding to the new one) to make the hex nature explicit.


interface TokenInfo {
decimals: number;
Expand Down
44 changes: 0 additions & 44 deletions backend/src/constants/Token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,50 +142,6 @@ export const CustomDeployedPaymasters: Record<number, Record<string, string>> =
}
}

export const PAYMASTER_ADDRESS: Record<number, Record<string, string>> = {
1: {
USDC: "0x0000000000fABFA8079AB313D1D14Dcf4D15582a"
},
56: {
USDC: "0x0000000000db7995889f54d72dac9d36a9f7f467"
},
100: {
USDC: "0x000000000034b78bfe02be30ae4d324c8702803d"
},
137: {
eUSDC: "0xa683b47e447De6c8A007d9e294e87B6Db333Eb18",
USDC: "0x00000000003011eef3f79892ba3d521e5ba5c5c0"
},
8453: {
USDC: "0x939263eafe57038a072cb4edd6b25dd81a8a6c56"
},
84532: {
USDC: "0x0000000000dd6dd248ab5487218e1c2d7fbb29c9"
},
42161: {
eUSDC: "0x49EE41bC335Fb36be46A17307dcFe536A3494644",
USDC: "0x000000000058e13d711bb4706bf822a79c35d8b1"
},
59144: {
USDC: "0x0000000000Cf745CB08EE7A6F0A2D74BB942E414"
},
10: {
USDC: "0x0000000000fce6614d3c6f679e48c9cdd09aa634"
},
11155111: {
USDC: "0x0000000000325602a77416a16136fdafd04b299f"
},
80001: {
USDC: "0x000000000009B901DeC1aaB9389285965F49D387"
},
114: {
USDT: "0xED35f8fa422Ba95A52A000236F1EAFd7e4fA4D52"
},
14: {
eUSDC: "0xA5589D278778Eaae346383dD710D7913d8A6a2aA"
}
}

/**
* Example Structure for adding deployed multi-token paymasters on AWS secrets manager
*/
Expand Down
Loading