From f221e21e441c1e603608545db0a280d8dd1f75ca Mon Sep 17 00:00:00 2001 From: PFC <81114960+PFC-developer@users.noreply.github.com> Date: Sat, 7 Dec 2024 12:35:52 -0600 Subject: [PATCH 1/2] make docker build again. package updates. eslint fix ran --- .dockerignore | 1 + Dockerfile | 13 +++++++++---- package.json | 17 +++++++++-------- src/msgs/recvPacket.ts | 2 +- src/workers/index.ts | 2 +- src/workers/wallet.ts | 2 +- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4264f88..b0216f6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ /.idea /.node_modules +/node_modules /.gitignore diff --git a/Dockerfile b/Dockerfile index fc30abd..e72bcb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,13 +5,18 @@ COPY package.json . RUN npm install\ && npm install typescript -g COPY . . -RUN tsc - +#RUN tsc +LABEL org.opencontainers.image.source="https://github.com/initia-labs/rapid-relayer" +LABEL org.opencontainers.image.description="Initia Labs Rapid Relayer" ENV CONFIGFILE=/config/config.json ENV SYNC_INFO=/syncInfo/syncInfo -EXPOSE 3000 + +EXPOSE 7010 +EXPOSE 7011 +ENV MNEMONIC="your seed goes here" + VOLUME /config VOLUME /syncInfo -CMD ["npm", "start"] \ No newline at end of file +CMD ["npm", "start"] diff --git a/package.json b/package.json index c04e6ba..6695ec3 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,16 @@ "dependencies": { "@confio/ics23": "^0.6.8", "@cosmjs/encoding": "^0.32.3", - "@cosmjs/json-rpc": "^0.32.3", - "@cosmjs/stargate": "^0.32.3", - "@cosmjs/tendermint-rpc": "^0.32.3", - "@initia/initia.js": "^0.2.20", - "@initia/initia.proto": "^0.2.0", + "@cosmjs/json-rpc": "^0.32.4", + "@cosmjs/stargate": "^0.32.4", + "@cosmjs/tendermint-rpc": "^0.32.4", + "@initia/initia.js": "^0.2.23", + "@initia/initia.proto": "^0.2.4", "axios": "^1.7.5", "bech32": "^2.0.0", "better-sqlite3": "^11.3.0", "bluebird": "^3.7.2", + "cosmjs-types": "^0.9.0", "express": "^4.19.2", "http": "^0.0.1-security", "https": "^1.0.0", @@ -38,15 +39,15 @@ "@types/express": "^4.17.21", "@types/jest": "^29.5.14", "@types/node": "^22.5.4", - "eslint": "^8.57.0", + "eslint": "^9.16.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", "msw": "^2.6.2", "ts-jest": "^29.2.5", - "typescript": "^5.6.3", - "typescript-eslint": "^7.16.0" + "typescript": "^5.7.2", + "typescript-eslint": "^8.17.0" }, "lint-staged": { "src/**/*.{mjs|ts}": [ diff --git a/src/msgs/recvPacket.ts b/src/msgs/recvPacket.ts index aa260ba..1ce7d2b 100644 --- a/src/msgs/recvPacket.ts +++ b/src/msgs/recvPacket.ts @@ -1,4 +1,4 @@ -import { Packet } from '@initia/initia.js' +import { Packet} from '@initia/initia.js' import { MsgRecvPacket } from '@initia/initia.js' import { Height } from 'cosmjs-types/ibc/core/client/v1/client' import { Transform } from 'src/lib/transform' diff --git a/src/workers/index.ts b/src/workers/index.ts index 768dd3a..42143c0 100644 --- a/src/workers/index.ts +++ b/src/workers/index.ts @@ -83,7 +83,7 @@ export class WorkerController { latestHeight, chainConfig.wallets .map((wallet) => wallet.startHeight) - .filter((v) => v !== undefined) as number[] + .filter((v) => v !== undefined) ) this.chains[chainConfig.chainId] = chain diff --git a/src/workers/wallet.ts b/src/workers/wallet.ts index fa9c64d..103a4fd 100644 --- a/src/workers/wallet.ts +++ b/src/workers/wallet.ts @@ -669,6 +669,6 @@ export class WalletWorker { ChannelController.delOpenEvents(eventsToDel) - return res.filter((v) => v !== undefined) as ChannelOpenCloseTable[] + return res.filter((v) => v !== undefined) } } From 2db7ce35af754eede55e672421c3dc841525128d Mon Sep 17 00:00:00 2001 From: PFC <81114960+PFC-developer@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:04:22 -0600 Subject: [PATCH 2/2] fix: shut coderabbitai up --- .dockerignore | 2 +- Dockerfile | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index b0216f6..325c410 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,4 @@ /.idea -/.node_modules +#/.node_modules /node_modules /.gitignore diff --git a/Dockerfile b/Dockerfile index e72bcb0..07821e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM node:alpine WORKDIR /usr/rapid-relayer COPY package.json . -RUN npm install\ - && npm install typescript -g +RUN npm install +# && npm install typescript -g COPY . . #RUN tsc @@ -12,9 +12,13 @@ LABEL org.opencontainers.image.description="Initia Labs Rapid Relayer" ENV CONFIGFILE=/config/config.json ENV SYNC_INFO=/syncInfo/syncInfo +# main port EXPOSE 7010 +# metrics port EXPOSE 7011 -ENV MNEMONIC="your seed goes here" + +# MNEMONIC must be provided at runtime (if your config uses it) +ENV MNEMONIC="" VOLUME /config VOLUME /syncInfo