diff --git a/.dockerignore b/.dockerignore index 4264f88..325c410 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ /.idea -/.node_modules +#/.node_modules +/node_modules /.gitignore diff --git a/Dockerfile b/Dockerfile index fc30abd..07821e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,25 @@ 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 - +#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 + +# main port +EXPOSE 7010 +# metrics port +EXPOSE 7011 + +# MNEMONIC must be provided at runtime (if your config uses it) +ENV MNEMONIC="" + 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) } }