Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/actions/prepare-web/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Prepare web deployment
description: Export the Web package and its resolved workspace dependencies for Vercel
runs:
using: composite
steps:
- uses: actions/setup-node@v6
with:
node-version: '22'
- shell: bash
run: >-
corepack pnpm --filter @ringdao/msgscan-ui deploy web-deploy
--lockfile-only --ignore-scripts --config.inject-workspace-packages=true
20 changes: 15 additions & 5 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@ jobs:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: ./.github/actions/prepare-web

- uses: darwinia-network/devops/actions/smart-vercel@main
name: Deploy to Vercel
id: vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_run: false
dist_path: packages/web
dist_path: web-deploy
project_name: msgscan
enable_cache: true
enable_notify_comment: true
enable_notify_slack: true
slack_channel: public-msgport
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

- name: Notify Slack of preview
uses: rtCamp/action-slack-notify@v2
continue-on-error: true
env:
SLACK_CHANNEL: public-msgport
SLACK_COLOR: success
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: ${{ steps.vercel.outputs.PREVIEW_LINK }}
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
20 changes: 15 additions & 5 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,30 @@ jobs:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: ./.github/actions/prepare-web

- uses: darwinia-network/devops/actions/smart-vercel@main
name: Deploy to Vercel
id: vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_run: false
dist_path: packages/web
dist_path: web-deploy
project_name: msgscan
prod_mode: true
enable_cache: true
enable_notify_slack: true
slack_channel: public-msgport
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

- name: Notify Slack of deployment
uses: rtCamp/action-slack-notify@v2
continue-on-error: true
env:
SLACK_CHANNEL: public-msgport
SLACK_COLOR: success
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: ${{ steps.vercel.outputs.PREVIEW_LINK }}
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
20 changes: 15 additions & 5 deletions .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@ jobs:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: ./.github/actions/prepare-web

- uses: darwinia-network/devops/actions/smart-vercel@main
name: Deploy to Vercel
id: vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
script_run: false
dist_path: packages/web
dist_path: web-deploy
project_name: msgscan
enable_cache: true
enable_notify_slack: true
slack_channel: public-msgport
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

- name: Notify Slack of preview
uses: rtCamp/action-slack-notify@v2
continue-on-error: true
env:
SLACK_CHANNEL: public-msgport
SLACK_COLOR: success
SLACK_ICON: https://avatars.githubusercontent.com/u/14985020?s=48&v=4
SLACK_MESSAGE: ${{ steps.vercel.outputs.PREVIEW_LINK }}
SLACK_TITLE: Preview
SLACK_USERNAME: Vercel
SLACK_WEBHOOK: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

env:
DOCKER_REGISTRY: ghcr.io
Expand All @@ -22,7 +21,7 @@ jobs:
- uses: actions/checkout@v4

- name: Docker login
uses: docker/login-action@v1
uses: docker/login-action@v4
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ build
*.tsbuildinfo
.env
*.db
*.db-journal
*.db-journal

.worktrees/
17 changes: 12 additions & 5 deletions docker/gripper.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
FROM node:22-alpine

RUN apk add --no-cache openssl

WORKDIR /app

COPY packages/gripper .
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/gripper/package.json ./packages/gripper/
RUN corepack pnpm --filter msgscan-indexer install --frozen-lockfile

RUN yarn install \
&& yarn build \
&& yarn cache clean
WORKDIR /app/packages/gripper
COPY packages/gripper/tsconfig.json ./
COPY packages/gripper/prisma ./prisma
COPY packages/gripper/scripts ./scripts
COPY packages/gripper/src ./src
RUN corepack pnpm run build

ENTRYPOINT ["/app/scripts/start.sh"]
ENTRYPOINT ["/app/packages/gripper/scripts/start.sh"]
20 changes: 8 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
"name": "@ringdao/msgscan",
"version": "0.1.0",
"private": true,
"packageManager": "[email protected]",
"scripts": {
"start:web": "pnpm --filter @ringdao/msgscan-ui start",
"build:web": "pnpm --filter @ringdao/msgscan-ui build",
"build:all": "pnpm --filter @ringdao/* build"
"packageManager": "[email protected]",
"engines": {
"node": "22.x",
"pnpm": "10.x"
},
"pnpm": {
"overrides": {
"esbuild": "0.28.1",
"lodash": "4.18.1",
"postcss": "8.5.16",
"vite": "7.3.6"
}
"scripts": {
"start:web": "corepack pnpm --filter @ringdao/msgscan-ui start",
"build:web": "corepack pnpm --filter @ringdao/msgscan-ui build",
"build:all": "corepack pnpm -r build"
}
}
50 changes: 25 additions & 25 deletions packages/gripper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,40 @@
"description": "msgscan indexer",
"main": "build/index.js",
"scripts": {
"build": "shx rm -rf build && tsc -b",
"build": "prisma generate && shx rm -rf build && tsc -b",
"package": "node esbuild.js",
"start": "node build/index.js",
"lint": "eslint . --ext .ts --fix"
},
"dependencies": {
"@fastify/express": "^4.0.5",
"@fastify/cors": "^10",
"@fastify/http-proxy": "^11.4.4",
"@joggr/fastify-prisma": "^5",
"chalk": "^4",
"commander": "^12",
"graphql": "^16.10.0",
"pino-pretty": "^13.0.0",
"reflect-metadata": "^0.2",
"typedi": "^0.10",
"graphql-request": "^7.1.2",
"@prisma/client": "6",
"fastify": "^5.8.3",
"postgraphile": "^4.14.1",
"@fastify/cors": "^10.1.0",
"@fastify/express": "^4.0.13",
"@fastify/http-proxy": "^11.6.10",
"@graphile-contrib/pg-simplify-inflector": "^6.1.0",
"postgraphile-plugin-connection-filter": "^2.3.0"
"@joggr/fastify-prisma": "^5.2.1",
"@prisma/client": "^6.19.3",
"chalk": "^4.1.2",
"commander": "^12.1.0",
"fastify": "^5.12.8",
"graphql": "^16.15.0",
"graphql-request": "^7.4.0",
"pino-pretty": "^13.2.0",
"postgraphile": "^4.14.1",
"postgraphile-plugin-connection-filter": "^2.3.0",
"reflect-metadata": "^0.2.2",
"typedi": "^0.10.0"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.5",
"@types/node": "^22",
"@typescript-eslint/eslint-plugin": "^5",
"@typescript-eslint/parser": "^5",
"esbuild": "^0.25",
"eslint": "^8",
"@graphql-codegen/cli": "^8.0.0",
"@types/node": "^22.20.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"esbuild": "0.28.1",
"eslint": "^8.57.1",
"prisma": "^6.19.3",
"shx": "^0.3.4",
"ts-node": "^10",
"typescript": "^5",
"prisma": "^6"
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
},
"files": [
"dist",
Expand Down
6 changes: 3 additions & 3 deletions packages/gripper/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORK_PATH=${BIN_PATH}/../

cd ${WORK_PATH}

npx prisma migrate dev --name init
npx prisma generate
corepack pnpm exec prisma migrate dev --name init
corepack pnpm exec prisma generate

npm run start -- $@
exec corepack pnpm run start "$@"
5 changes: 1 addition & 4 deletions packages/gripper/src/task/indexer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { setTimeout } from "timers/promises";
import { Service } from "typedi";
import { GripperRunnerOptions } from "../types";
// @ts-ignore
import { gql, request } from "graphql-request";

@Service({})
Expand All @@ -10,9 +9,7 @@ export class IndexerTask {
endpoint: "https://ormpindexer.ringdao.com/graphql",
};

private skipCounter: number = 0;

constructor() {}
private skipCounter = 0;

async start(options: GripperRunnerOptions) {
const { fastify } = options;
Expand Down
52 changes: 26 additions & 26 deletions packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ringdao/msgscan-ui",
"version": "0.2.0",
"packageManager": "pnpm@10.15.0",
"packageManager": "pnpm@10.34.9",
"engines": {
"node": "22.x",
"pnpm": "10.x"
Expand All @@ -14,49 +14,49 @@
"test": "vitest run"
},
"dependencies": {
"@base-ui/react": "^1.2.0",
"@tanstack/react-query": "^5.90.21",
"@base-ui/react": "^1.9.0",
"@tanstack/react-query": "^5.108.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"framer-motion": "^12.34.0",
"date-fns": "^4.4.0",
"framer-motion": "^12.43.0",
"graphql-request": "^7.4.0",
"lucide-react": "^0.563.0",
"next": "16.2.6",
"next": "16.4.6",
"next-themes": "0.4.6",
"nuqs": "2.8.8",
"react": "19.2.4",
"react-day-picker": "^9.13.2",
"react-dom": "19.2.4",
"recharts": "^3.7.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.0",
"react": "19.2.9",
"react-day-picker": "^9.14.0",
"react-dom": "19.2.9",
"recharts": "^3.11.1",
"sonner": "^2.0.8",
"tailwind-merge": "^3.7.1",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@tailwindcss/postcss": "4.1.18",
"@tanstack/eslint-plugin-query": "^5.91.4",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^25.2.3",
"@tanstack/eslint-plugin-query": "^5.108.4",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.13",
"@types/node": "^22.20.5",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"@typescript-eslint/eslint-plugin": "8.55.0",
"@typescript-eslint/parser": "8.55.0",
"@typescript-eslint/eslint-plugin": "8.74.0",
"@typescript-eslint/parser": "8.74.0",
"eslint": "9.39.2",
"eslint-config-next": "16.2.6",
"eslint-config-next": "16.4.6",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-import": "^2.32.0",
"jsdom": "^28.0.0",
"postcss": "^8.5.6",
"prettier": "^3.8.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"jsdom": "^28.1.0",
"postcss": "8.5.33",
"prettier": "^3.10.1",
"prettier-plugin-tailwindcss": "^0.7.4",
"tailwindcss": "4.1.18",
"typescript": "5.9.3",
"vite": "^7.3.6",
"vite": "7.3.8",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.1.0"
"vitest": "^4.1.12"
}
}
2 changes: 1 addition & 1 deletion packages/web/src/app/message/[id]/components/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import type React from 'react';

interface CardProps {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import Image from 'next/image';

import { dappRemark } from '@/config/dapp_remark';
import { capitalizeText, getDAppInfo } from '@/utils/dapp';
import { cn } from '@/lib/utils';

import type React from 'react';

interface AddressDisplayFilterDappRemarkProps {
address: string;
formatAddress?: (address: string) => string;
Expand Down
Loading