Skip to content

Commit

Permalink
Added Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
OxideDall committed Jan 30, 2025
1 parent 00e4644 commit 5937ea6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ BATCH_SWEEPER_ADDRESS=
ACTOR_PRIVATE_KEY=
GAS_RATIO=
CONFIRMATIONS=
RETRY_INTERVAL=
RETRY_INTERVAL=
MAX_RETRIES=
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM ghcr.io/foundry-rs/foundry AS builder

WORKDIR /sweeper

COPY lib /sweeper/lib
COPY contracts /sweeper/contracts
COPY foundry.toml /sweeper/foundry.toml

RUN forge build

FROM node:20.18-bullseye

WORKDIR /sweeper

COPY package.json package-lock.json ./
RUN npm i

COPY --from=builder /sweeper/out /sweeper/out

COPY typegen.sh /sweeper/typegen.sh
RUN sh typegen.sh

COPY service /sweeper/service
COPY types /sweeper/types
COPY tsconfig.json /sweeper/tsconfig.json

RUN npm run build

CMD ["node", "dist/service/main.js"]


1 change: 1 addition & 0 deletions service/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const getConfig = (): Config => ({
GAS_RATIO: BigInt(process.env.GAS_RATIO || 1),
CONFIRMATIONS: Number(process.env.CONFIRMATIONS || 1),
RETRY_INTERVAL: Number(process.env.RETRY_INTERVAL || 1000),
MAX_RETRIES: Number(process.env.MAX_RETRIES || 5),
});

export class AsyncNonceWallet extends ethers.Wallet {
Expand Down

0 comments on commit 5937ea6

Please sign in to comment.