Skip to content

Commit b72c1b3

Browse files
Merge pull request #7 from InternetMaximalism/rename-aggregator
rename to intmax2-aggregator
2 parents 2e939ff + 3273343 commit b72c1b3

26 files changed

+36
-36
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# intmax2-withdrawal-aggregator
1+
# intmax2-aggregator
22

3-
The withdrawal aggregator is responsible for consolidating withdrawals and managing requests to the ZKP (Zero-Knowledge Proof).
3+
The aggregator is responsible for consolidating withdrawals and managing requests to the ZKP (Zero-Knowledge Proof).
44

55
## Development
66

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
postgres:
33
image: postgres:15.10
4-
container_name: intmax2-withdrawal-aggregator-postgres
4+
container_name: intmax2-aggregator-postgres
55
hostname: postgres
66
restart: unless-stopped
77
environment:
@@ -15,7 +15,7 @@ services:
1515

1616
redis:
1717
image: redis:7.4.2
18-
container_name: intmax2-withdrawal-aggregator-redis
18+
container_name: intmax2-aggregator-redis
1919
hostname: redis
2020
restart: unless-stopped
2121
ports:

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "intmax2-withdrawal-aggregator",
2+
"name": "intmax2-aggregator",
33
"version": "1.2.7",
44
"workspaces": [
55
"packages/*"
66
],
77
"scripts": {
88
"build": "yarn workspaces foreach --all --topological run build",
9-
"build:shared": "yarn workspace @intmax2-withdrawal-aggregator/shared run build",
9+
"build:shared": "yarn workspace @intmax2-aggregator/shared run build",
1010
"build:parallel": "yarn workspaces foreach --all -pt run build",
1111
"lint": "biome lint .",
1212
"format": "biome check --write --unsafe .",

packages/collector/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "collector",
33
"version": "1.0.0",
44
"dependencies": {
5-
"@intmax2-withdrawal-aggregator/shared": "workspace:*",
5+
"@intmax2-aggregator/shared": "workspace:*",
66
"date-fns": "^4.1.0"
77
},
88
"scripts": {

packages/collector/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cleanup, logger, timeOperation } from "@intmax2-withdrawal-aggregator/shared";
1+
import { cleanup, logger, timeOperation } from "@intmax2-aggregator/shared";
22
import { name } from "../package.json";
33
import { performJob } from "./service/job.service";
44

packages/collector/src/service/job.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type RequestingWithdrawal, config, logger } from "@intmax2-withdrawal-aggregator/shared";
1+
import { type RequestingWithdrawal, config, logger } from "@intmax2-aggregator/shared";
22
import { differenceInMinutes } from "date-fns";
33
import { chunkArray } from "../lib/utils";
44
import { createWithdrawalGroup, fetchRequestingWithdrawals } from "./withdrawal.service";

packages/collector/src/service/withdrawal.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
logger,
88
withdrawalManager,
99
withdrawalPrisma,
10-
} from "@intmax2-withdrawal-aggregator/shared";
10+
} from "@intmax2-aggregator/shared";
1111

1212
export const fetchRequestingWithdrawals = async () => {
1313
const processedUUIDs = await withdrawalManager.getAllProcessedUUIDs();

packages/processor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "processor",
33
"version": "1.0.0",
44
"dependencies": {
5-
"@intmax2-withdrawal-aggregator/shared": "workspace:*",
5+
"@intmax2-aggregator/shared": "workspace:*",
66
"axios": "^1.7.9",
77
"ethers": "^6.13.5"
88
},

packages/processor/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { QueueManager, cleanup, logger } from "@intmax2-withdrawal-aggregator/shared";
1+
import { QueueManager, cleanup, logger } from "@intmax2-aggregator/shared";
22
import { name } from "../package.json";
33
import { startHealthCheckServer } from "./lib/healthCheck";
44
import { shutdown } from "./lib/shutdown";

packages/processor/src/lib/healthCheck.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import http from "http";
2-
import { config, logger } from "@intmax2-withdrawal-aggregator/shared";
2+
import { config, logger } from "@intmax2-aggregator/shared";
33
import { name } from "../../package.json";
44

55
const server = http.createServer((req, res) => {

packages/processor/src/lib/shutdown.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cleanup, logger } from "@intmax2-withdrawal-aggregator/shared";
1+
import { cleanup, logger } from "@intmax2-aggregator/shared";
22

33
let isShuttingDown = false;
44

packages/processor/src/lib/zkp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { config } from "@intmax2-withdrawal-aggregator/shared";
1+
import { config } from "@intmax2-aggregator/shared";
22
import axios, { type AxiosError, type AxiosRequestConfig } from "axios";
33
import type {
44
CreateGnarkProofResponse,

packages/processor/src/service/job.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
timeOperation,
77
withdrawalManager,
88
withdrawalPrisma,
9-
} from "@intmax2-withdrawal-aggregator/shared";
9+
} from "@intmax2-aggregator/shared";
1010
import { EXECUTION_REVERTED_ERROR_MESSAGE } from "../constants";
1111
import { processWithdrawalGroup } from "./withdrawal.service";
1212

packages/processor/src/service/proof.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
getRandomString,
44
getWalletClient,
55
logger,
6-
} from "@intmax2-withdrawal-aggregator/shared";
6+
} from "@intmax2-aggregator/shared";
77
import { DEFAULT_ID_LENGTH } from "../constants";
88
import { pollGnarkProof, pollWithdrawalProof, pollWithdrawalWrapperProof } from "../lib/poll";
99
import { createGnarkProof, createWithdrawalProof, createWrappedProof } from "../lib/zkp";

packages/processor/src/service/submit.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
getWalletClient,
1616
logger,
1717
replacedEthersTransaction,
18-
} from "@intmax2-withdrawal-aggregator/shared";
18+
} from "@intmax2-aggregator/shared";
1919
import { ethers } from "ethers";
2020
import { type Abi, type PublicClient, toHex } from "viem";
2121
import {

packages/processor/src/service/withdrawal.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
getWalletClient,
66
logger,
77
withdrawalPrisma,
8-
} from "@intmax2-withdrawal-aggregator/shared";
8+
} from "@intmax2-aggregator/shared";
99
import { formatContractWithdrawal, getLastWithdrawalHashFromWithdrawalProofs } from "../lib/utils";
1010
import type { GnarkProof, WithdrawalProof, WithdrawalWithProof } from "../types";
1111
import {

packages/shared/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# @intmax2-withdrawal-aggregator/shared
1+
# @intmax2-aggregator/shared
22

3-
@intmax2-withdrawal-aggregator/shared is a shared library designed to provide common functionalities and utilities for projects within the INTMAX2 ecosystem.
3+
@intmax2-aggregator/shared is a shared library designed to provide common functionalities and utilities for projects within the INTMAX2 ecosystem.
44

55
## Usage
66

packages/shared/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@intmax2-withdrawal-aggregator/shared",
2+
"name": "@intmax2-aggregator/shared",
33
"version": "1.0.0",
44
"main": "dist/index.js",
55
"dependencies": {

packages/shared/src/config/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const config = cleanEnv(process.env, {
1111
choices: ["fatal", "error", "warn", "info", "debug", "trace"],
1212
default: "debug",
1313
}),
14-
SERVICE_NAME: str({ default: "intmax2-withdrawal-aggregator" }),
14+
SERVICE_NAME: str({ default: "intmax2-aggregator" }),
1515
SERVICE_VERSION: str({ default: "v0.0.0" }),
1616
// db
1717
EVENT_DATABASE_URL: str(),

packages/watcher/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "watcher",
33
"version": "1.0.0",
44
"dependencies": {
5-
"@intmax2-withdrawal-aggregator/shared": "workspace:*"
5+
"@intmax2-aggregator/shared": "workspace:*"
66
},
77
"scripts": {
88
"start": "node dist/index.js",

packages/watcher/src/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { config } from "@intmax2-withdrawal-aggregator/shared";
1+
import { config } from "@intmax2-aggregator/shared";
22

33
export const LIQUIDITY_CONTRACT_ADDRESS = config.LIQUIDITY_CONTRACT_ADDRESS as `0x${string}`;
44
export const LIQUIDITY_CONTRACT_DEPLOYED_BLOCK = BigInt(

packages/watcher/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cleanup, logger, timeOperation } from "@intmax2-withdrawal-aggregator/shared";
1+
import { cleanup, logger, timeOperation } from "@intmax2-aggregator/shared";
22
import { name } from "../package.json";
33
import { performJob } from "./service/job.service";
44

packages/watcher/src/service/event.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
fetchEvents,
1010
logger,
1111
withdrawalClaimableEvent,
12-
} from "@intmax2-withdrawal-aggregator/shared";
12+
} from "@intmax2-aggregator/shared";
1313
import { parseAbiItem } from "abitype";
1414
import type { PublicClient } from "viem";
1515
import { LIQUIDITY_CONTRACT_ADDRESS, LIQUIDITY_CONTRACT_DEPLOYED_BLOCK } from "../constants";

packages/watcher/src/service/job.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createNetworkClient, eventPrisma } from "@intmax2-withdrawal-aggregator/shared";
1+
import { createNetworkClient, eventPrisma } from "@intmax2-aggregator/shared";
22
import { WITHDRAWAL_EVENT_NAMES } from "../types";
33
import { handleAllWithdrawalEvents } from "./event.service";
44
import { batchUpdateWithdrawalStatusTransactions } from "./withdrawal.service";

packages/watcher/src/service/withdrawal.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
WithdrawalStatus,
44
logger,
55
withdrawalPrisma,
6-
} from "@intmax2-withdrawal-aggregator/shared";
6+
} from "@intmax2-aggregator/shared";
77
import type { WithdrawalEventType } from "../types";
88

99
export const batchUpdateWithdrawalStatusTransactions = async (

yarn.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ __metadata:
278278
languageName: node
279279
linkType: hard
280280

281-
"@intmax2-withdrawal-aggregator/shared@workspace:*, @intmax2-withdrawal-aggregator/shared@workspace:packages/shared":
281+
"@intmax2-aggregator/shared@workspace:*, @intmax2-aggregator/shared@workspace:packages/shared":
282282
version: 0.0.0-use.local
283-
resolution: "@intmax2-withdrawal-aggregator/shared@workspace:packages/shared"
283+
resolution: "@intmax2-aggregator/shared@workspace:packages/shared"
284284
dependencies:
285285
"@types/bull": "npm:^4.10.4"
286286
abitype: "npm:^1.0.8"
@@ -762,7 +762,7 @@ __metadata:
762762
version: 0.0.0-use.local
763763
resolution: "collector@workspace:packages/collector"
764764
dependencies:
765-
"@intmax2-withdrawal-aggregator/shared": "workspace:*"
765+
"@intmax2-aggregator/shared": "workspace:*"
766766
date-fns: "npm:^4.1.0"
767767
tsx: "npm:^4.19.2"
768768
typescript: "npm:^5.7.3"
@@ -1227,9 +1227,9 @@ __metadata:
12271227
languageName: node
12281228
linkType: hard
12291229

1230-
"intmax2-withdrawal-aggregator@workspace:.":
1230+
"intmax2-aggregator@workspace:.":
12311231
version: 0.0.0-use.local
1232-
resolution: "intmax2-withdrawal-aggregator@workspace:."
1232+
resolution: "intmax2-aggregator@workspace:."
12331233
dependencies:
12341234
"@biomejs/biome": "npm:1.9.4"
12351235
"@prisma/client": "npm:6.2.1"
@@ -1774,7 +1774,7 @@ __metadata:
17741774
version: 0.0.0-use.local
17751775
resolution: "processor@workspace:packages/processor"
17761776
dependencies:
1777-
"@intmax2-withdrawal-aggregator/shared": "workspace:*"
1777+
"@intmax2-aggregator/shared": "workspace:*"
17781778
axios: "npm:^1.7.9"
17791779
ethers: "npm:^6.13.5"
17801780
tsx: "npm:^4.19.2"
@@ -2159,7 +2159,7 @@ __metadata:
21592159
version: 0.0.0-use.local
21602160
resolution: "watcher@workspace:packages/watcher"
21612161
dependencies:
2162-
"@intmax2-withdrawal-aggregator/shared": "workspace:*"
2162+
"@intmax2-aggregator/shared": "workspace:*"
21632163
tsx: "npm:^4.19.2"
21642164
typescript: "npm:^5.7.3"
21652165
languageName: unknown

0 commit comments

Comments
 (0)