Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
a7b1674
Merge pull request #223 from etherspot/viem-rewrite
vignesha22 Sep 24, 2025
9460bcd
changed to string type as its returning bigint
vignesha22 Sep 25, 2025
95fffd7
Merge pull request #224 from etherspot/PRO-3715-Bug_Fixes
vignesha22 Sep 25, 2025
82b1efd
fixed bug on MTP v7 for viem
vignesha22 Oct 31, 2025
31e7d21
bump up the version
vignesha22 Nov 1, 2025
4cc26ea
Merge pull request #225 from etherspot/MTP_Bug_Fixes_V08
vignesha22 Nov 1, 2025
efeaca0
added migrations for MTP epv8 for ETH and OP USDC and USDT tokens
vignesha22 Nov 3, 2025
210e2ec
Merge pull request #226 from etherspot/MTP_Seed_Data
vignesha22 Nov 3, 2025
e685c14
update the docker file to include scripts
sankhavaramsaitulasiram Nov 3, 2025
3c6c89e
Merge pull request #228 from etherspot/feat/enable-migrations-on-docker
sankhavaramsaitulasiram Nov 3, 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
21 changes: 10 additions & 11 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
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/*
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Pin APK package versions to improve reproducibility and security.

Floating package versions can pull unintended updates; explicitly pinning versions ensures consistent builds.

-RUN apk update && apk add --no-cache g++ nodejs npm musl make musl-dev python3 git py3-setuptools && rm -rf /var/cache/apk/*
+RUN apk update && apk add --no-cache g++=13.2.1_p20240212-r1 nodejs=20.11.1-r0 npm=10.4.0-r0 musl=1.2.4_git20240131-r1 make=4.4.1-r2 musl-dev=1.2.4_git20240131-r1 python3=3.12.1-r1 git=2.43.0-r0 py3-setuptools=69.0.2-r0 && rm -rf /var/cache/apk/*

Consider also whether npm is still needed after full migration to Bun.

📝 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
RUN apk update && apk add --no-cache g++ nodejs npm musl make musl-dev python3 git py3-setuptools && rm -rf /var/cache/apk/*
RUN apk update && apk add --no-cache g++=13.2.1_p20240212-r1 nodejs=20.11.1-r0 npm=10.4.0-r0 musl=1.2.4_git20240131-r1 make=4.4.1-r2 musl-dev=1.2.4_git20240131-r1 python3=3.12.1-r1 git=2.43.0-r0 py3-setuptools=69.0.2-r0 && rm -rf /var/cache/apk/*
🧰 Tools
🪛 Hadolint (2.14.0)

[warning] 2-2: Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>

(DL3018)

🤖 Prompt for AI Agents
In backend/Dockerfile around line 2, the RUN line installs APK packages with
floating versions; update it to pin each package to a specific version (e.g.,
package=version) to ensure reproducible builds and improved security by using
known-good package versions, obtain the exact versions from your base image's
apk index (apk info -v or from the image tag) and replace each package in the
apk add list with package=VERSION; also remove npm from the install list if the
project has fully migrated to Bun to reduce image surface area and rebuild time.

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 ./migrations ./migrations
COPY ./scripts ./scripts
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
15 changes: 15 additions & 0 deletions backend/migrations/2025110100001-seed-data.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require('dotenv').config();
const viem = require('viem');

async function up({ context: queryInterface }) {
await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3', 10, 6, NOW(), NOW(), 'EPV_08')`);
await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0x94b008aA00579c1307B0EF2c499aD98a8ce58e58')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0xECef79E109e997bCA29c1c0897ec9d7b03647F5E', 10, 6, NOW(), NOW(), 'EPV_08')`);
await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6', 1, 6, NOW(), NOW(), 'EPV_08')`);
await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0xdAC17F958D2ee523a2206206994597C13D831ec7')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0x3E7d1eAB13ad0104d2750B8863b489D65364e32D', 1, 6, NOW(), NOW(), 'EPV_08')`);
}
Comment on lines +4 to +9
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

SQL injection risk and consider using parameterized queries.

The schema name from process.env.DATABASE_SCHEMA_NAME is directly interpolated into the SQL query, creating a potential SQL injection vector if the environment variable is compromised. Additionally, using string interpolation for all values is less secure than parameterized queries.

Consider using Sequelize's bulkInsert method for cleaner and safer code:

-async function up({ context: queryInterface }) {
-  await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3', 10, 6, NOW(), NOW(), 'EPV_08')`);
-  await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0x94b008aA00579c1307B0EF2c499aD98a8ce58e58')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0xECef79E109e997bCA29c1c0897ec9d7b03647F5E', 10, 6, NOW(), NOW(), 'EPV_08')`);
-  await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6', 1, 6, NOW(), NOW(), 'EPV_08')`);
-  await queryInterface.sequelize.query(`INSERT INTO "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ("TOKEN_ADDRESS", "PAYMASTER_ADDRESS", "ORACLE_ADDRESS", "CHAIN_ID", "DECIMALS", "CREATED_AT", "UPDATED_AT", "EP_VERSION") VALUES ('${viem.getAddress('0xdAC17F958D2ee523a2206206994597C13D831ec7')}', '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F', '0x3E7d1eAB13ad0104d2750B8863b489D65364e32D', 1, 6, NOW(), NOW(), 'EPV_08')`);
-}
+async function up({ context: queryInterface }) {
+  const tableName = 'multi_token_paymaster';
+  const schema = process.env.DATABASE_SCHEMA_NAME;
+  const now = new Date();
+  
+  await queryInterface.bulkInsert(
+    { tableName, schema },
+    [
+      {
+        TOKEN_ADDRESS: viem.getAddress('0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85'),
+        PAYMASTER_ADDRESS: '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F',
+        ORACLE_ADDRESS: '0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3',
+        CHAIN_ID: 10,
+        DECIMALS: 6,
+        CREATED_AT: now,
+        UPDATED_AT: now,
+        EP_VERSION: 'EPV_08'
+      },
+      {
+        TOKEN_ADDRESS: viem.getAddress('0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'),
+        PAYMASTER_ADDRESS: '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F',
+        ORACLE_ADDRESS: '0xECef79E109e997bCA29c1c0897ec9d7b03647F5E',
+        CHAIN_ID: 10,
+        DECIMALS: 6,
+        CREATED_AT: now,
+        UPDATED_AT: now,
+        EP_VERSION: 'EPV_08'
+      },
+      {
+        TOKEN_ADDRESS: viem.getAddress('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'),
+        PAYMASTER_ADDRESS: '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F',
+        ORACLE_ADDRESS: '0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6',
+        CHAIN_ID: 1,
+        DECIMALS: 6,
+        CREATED_AT: now,
+        UPDATED_AT: now,
+        EP_VERSION: 'EPV_08'
+      },
+      {
+        TOKEN_ADDRESS: viem.getAddress('0xdAC17F958D2ee523a2206206994597C13D831ec7'),
+        PAYMASTER_ADDRESS: '0x6Ad5796A4B5385bB3A1573C56115BF292Fb78d2F',
+        ORACLE_ADDRESS: '0x3E7d1eAB13ad0104d2750B8863b489D65364e32D',
+        CHAIN_ID: 1,
+        DECIMALS: 6,
+        CREATED_AT: now,
+        UPDATED_AT: now,
+        EP_VERSION: 'EPV_08'
+      }
+    ]
+  );
+}

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In backend/migrations/2025110100001-seed-data.cjs around lines 4-9, the
migration builds raw SQL with process.env.DATABASE_SCHEMA_NAME and token
addresses interpolated directly, creating SQL injection risk; replace the raw
string queries with a safe approach: validate or whitelist the
DATABASE_SCHEMA_NAME (or safely quote it using Sequelize utilities), then use
queryInterface.bulkInsert with the { tableName: 'multi_token_paymaster', schema:
<validated schema> } option (or use queryInterface.sequelize.query with
parameterized binds/replacements) and pass all column values as
parameters/objects instead of inline string interpolation so values are bound
and not concatenated.


async function down({ context: queryInterface }) {
await queryInterface.sequelize.query(`DELETE IF EXISTS FROM "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster;`);
}
Comment on lines +11 to +13
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: Invalid SQL syntax and unsafe rollback.

The down function has two critical issues:

  1. SQL syntax error: DELETE IF EXISTS FROM is invalid SQL syntax. The correct syntax is DELETE FROM. The IF EXISTS clause is only valid with DROP TABLE, not DELETE.

  2. Unsafe rollback: This deletes ALL records from the table, not just the 4 records inserted by this migration. This could cause data loss if other records exist in the table.

Apply this diff to fix both issues:

 async function down({ context: queryInterface }) {
-    await queryInterface.sequelize.query(`DELETE IF EXISTS FROM "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster;`);
+    const tableName = 'multi_token_paymaster';
+    const schema = process.env.DATABASE_SCHEMA_NAME;
+    
+    await queryInterface.bulkDelete(
+      { tableName, schema },
+      {
+        EP_VERSION: 'EPV_08',
+        CHAIN_ID: [1, 10],
+        TOKEN_ADDRESS: [
+          viem.getAddress('0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85'),
+          viem.getAddress('0x94b008aA00579c1307B0EF2c499aD98a8ce58e58'),
+          viem.getAddress('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'),
+          viem.getAddress('0xdAC17F958D2ee523a2206206994597C13D831ec7')
+        ]
+      }
+    );
 }

Committable suggestion skipped: line range outside the PR's diff.


module.exports = { up, 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.1",
"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') }\""
},
Comment on lines +19 to 21
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Postinstall script breaks Bun-only installs

The new Bun-based toolchain (and Bun Docker image) no longer guarantees a node binary. This postinstall will fail outright in that environment, blocking installs. Please drop the node -e … hook or replace it with a Bun-compatible implementation.

Apply this diff:

-    "test": "bun test",
-    "postinstall": "node -e \"try { require('esbuild/install') } catch (e) { console.log('Using JS fallback for esbuild') }\""
+    "test": "bun test"
📝 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
"test": "bun test",
"postinstall": "node -e \"try { require('esbuild/install') } catch (e) { console.log('Using JS fallback for esbuild') }\""
},
"test": "bun test"
},
🤖 Prompt for AI Agents
In backend/package.json around lines 19-21, the postinstall script calls node
directly which breaks Bun-only environments because a node binary may not exist;
replace or remove this hook — either drop the postinstall entirely, or change it
to a Bun-compatible check that first detects if node is available (e.g. via a
shell check like command -v node) and only runs the require('esbuild/install')
step when node exists, otherwise skip or use a Bun-friendly fallback so installs
do not fail in Bun-only environments.

"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: 0 additions & 4 deletions backend/src/constants/MultiTokenPaymasterCronJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const MULTI_TOKEN_PAYMASTERS: Record<string, Record<string, string>> = {
"0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0xf7DE7E8A6bd59ED41a4b5fe50278b3B7f31384dF": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x7Ddc52c4De30e94Be3A6A0A2b259b2850f421989": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0xAD29AbB318791D579433D831ed122aFeAf29dcfe": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0xaEC945e04baF28b135Fa7c640f624f8D90F1C3a6": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x715D400F88C167884bbCc41C5FeA407ed4D2f8A0": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x90C97F71E18723b0Cf0dfa30ee176Ab653E89F40": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
Expand All @@ -84,7 +83,6 @@ export const MULTI_TOKEN_PAYMASTERS: Record<string, Record<string, string>> = {
"0x4691937a7508860F876c9c0a2a617E7d9E945D4B": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x16939ef78684453bfDFb47825F8a5F714f12623a": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x8F0528cE5eF7B51152A59745bEfDD91D97091d2F": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x762539b45A1dCcE3D36d080F74d1AED37844b878": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0xFd7B3A77848f1C2D67E05E54d78d174a0C850335": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
"0x1Fa4a73a3F0133f0025378af00236f3aBDEE5D63": "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3",
Expand Down Expand Up @@ -199,7 +197,6 @@ export const MULTI_TOKEN_ORACLES: Record<string, Record<string, string>> = {
"0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD": "0xca236E327F629f9Fc2c30A4E95775EbF0B89fac8",
"0xf7DE7E8A6bd59ED41a4b5fe50278b3B7f31384dF": "0x20123C6ebd45c6496102BeEA86e1a6616Ca547c6",
"0x7Ddc52c4De30e94Be3A6A0A2b259b2850f421989": "0x8b0D36ae4CF8e277773A7ba5F35c09Edb144241b",
"0xAD29AbB318791D579433D831ed122aFeAf29dcfe": "0xe2A47e87C0f4134c8D06A41975F6860468b2F925",
"0xaEC945e04baF28b135Fa7c640f624f8D90F1C3a6": "0x889158E39628C0397DC54B84F6b1cbe0AaEb7FFc",
"0x715D400F88C167884bbCc41C5FeA407ed4D2f8A0": "0x7B49524ee5740c99435f52d731dFC94082fE61Ab",
"0x90C97F71E18723b0Cf0dfa30ee176Ab653E89F40": "0x13A9c98b07F098c5319f4FF786eB16E22DC738e1",
Expand All @@ -208,7 +205,6 @@ export const MULTI_TOKEN_ORACLES: Record<string, Record<string, string>> = {
"0x4691937a7508860F876c9c0a2a617E7d9E945D4B": "0x02Bfe714e78E2Ad1bb1C2beE93eC8dc5423B66d4",
"0x16939ef78684453bfDFb47825F8a5F714f12623a": "0x9A18137ADCF7b05f033ad26968Ed5a9cf0Bf8E6b",
"0x8F0528cE5eF7B51152A59745bEfDD91D97091d2F": "0xe0073b60833249ffd1bb2af809112c2fbf221DF6",
"0x762539b45A1dCcE3D36d080F74d1AED37844b878": "0x38393201952f2764E04B290af9df427217D56B41",
"0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2": "0x87701B15C08687341c2a847ca44eCfBc8d7873E1",
"0xFd7B3A77848f1C2D67E05E54d78d174a0C850335": "0x887f177CBED2cf555a64e7bF125E1825EB69dB82",
"0x1Fa4a73a3F0133f0025378af00236f3aBDEE5D63": "0x0Fe4D87883005fCAFaF56B81d09473D9A29dCDC3",
Expand Down
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);

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
Loading