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
146 changes: 108 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,28 @@ jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
- name: yarn-install
# Check out the lockfile from main, reinstall, and then
# verify the lockfile matches what was committed.
node-version-file: 'package.json'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: pnpm-install
run: |
yarn install
pnpm install --frozen-lockfile
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES"
Expand All @@ -38,32 +48,62 @@ jobs:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: build
run: yarn run build
run: pnpm run build
env:
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_ID }}

prettier:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: prettier
run: |
yarn run prettier
pnpm run prettier
CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES"
Expand All @@ -74,26 +114,56 @@ jobs:
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: lint
run: yarn run lint
run: pnpm run lint

test:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'

- name: Get pnpm store directory
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: test
run: yarn run test
run: pnpm run test
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# dependencies
/node_modules
/.pnp
.pnp.js
cache/
.yarn/install-state.gz
.pnpm-store/

# testing
/coverage
Expand All @@ -26,8 +24,6 @@ coverage.json

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
Expand All @@ -41,3 +37,4 @@ yarn-error.log*
*.tsbuildinfo

.idea
next-env.d.ts
5 changes: 3 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
yarn run typecheck
yarn run lint-staged
pnpm run prettier
pnpm run lint
pnpm run typecheck
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test/outputs
public
public
LICENSE.md
33 changes: 0 additions & 33 deletions .yarn/plugins/@yarnpkg/plugin-outdated.cjs

This file was deleted.

942 changes: 0 additions & 942 deletions .yarn/releases/yarn-4.12.0.cjs

This file was deleted.

13 changes: 0 additions & 13 deletions .yarnrc.yml

This file was deleted.

67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ Pruv Bridge is a Hyperlane-powered web application for moving fungible tokens an

## Contents

- [Highlights](#highlights)
- [Tech stack](#tech-stack)
- [Requirements](#requirements)
- [Quick start](#quick-start)
- [Development workflow](#development-workflow)
- [Environment configuration](#environment-configuration)
- [Architecture & key folders](#architecture--key-folders)
- [Customization & feature flags](#customization--feature-flags)
- [Deployment](#deployment)
- [Troubleshooting & resources](#troubleshooting--resources)
- [Pruv Bridge](#pruv-bridge)
- [Contents](#contents)
- [Highlights](#highlights)
- [Tech stack](#tech-stack)
- [Requirements](#requirements)
- [Quick start](#quick-start)
- [Running with Docker](#running-with-docker)
- [Development workflow](#development-workflow)
- [Environment configuration](#environment-configuration)
- [Architecture \& key folders](#architecture--key-folders)
- [Customization \& feature flags](#customization--feature-flags)
- [Deployment](#deployment)
- [Troubleshooting \& resources](#troubleshooting--resources)

## Highlights

Expand Down Expand Up @@ -59,39 +62,33 @@ Pruv Bridge is a Hyperlane-powered web application for moving fungible tokens an
### Running with Docker

```sh
docker compose up --build
# Install dependencies
pnpm install

# Build Next project
pnpm run build
```

The container exposes the Next.js server on port 3000. Provide env vars via `docker-compose.yaml` or `docker run -e` flags before building.

## Development workflow

| Command | Purpose |
| ----------------------------- | ---------------------------------------------------------------- |
| `yarn dev` | Run Next.js with hot reload and debugging helpers. |
| `yarn build` | Create an optimized production build (`.next`). |
| `yarn start` | Serve the production build locally. |
| `yarn lint` / `yarn lint:fix` | Check (or auto-fix) lint issues via ESLint. |
| `yarn typecheck` | Run `tsc` in no-emit mode to verify types. |
| `yarn test` | Execute Vitest suites once (no watch). |
| `yarn test:coverage` | Generate coverage reports (`coverage/`). |
| `yarn prettier` | Format the `src` tree with Prettier + Tailwind plugin. |
| `yarn clean` | Remove `.next`, `dist`, and `cache` artifacts for a clean slate. |
```sh
# Start the Next dev server
pnpm run dev
# Or with a custom projectId
NEXT_PUBLIC_WALLET_CONNECT_ID=<projectId> pnpm run dev
```

## Environment configuration

All env vars can be added to `.env.local` (for dev) or the hosting platform. The defaults live in `src/consts/config.ts`.
```sh
# Lint check code
pnpm run lint

| Variable | Description | Default |
| ---------------------------------------------------------- | ------------------------------------------------------------------ | ----------------------------- |
| `NEXT_PUBLIC_WALLET_CONNECT_ID` | WalletConnect v2 project ID used by RainbowKit. | Required |
| `NEXT_PUBLIC_VERSION` | Version label surfaced in the UI/logs. | `0.0.0` |
| `NEXT_PUBLIC_REGISTRY_URL` / `NEXT_PUBLIC_REGISTRY_BRANCH` | Point to a custom Hyperlane registry (and branch). | unset |
| `NEXT_PUBLIC_GITHUB_PROXY` | Proxy used by `GithubRegistry` when fetching remote configs. | `https://proxy.hyperlane.xyz` |
| `NEXT_PUBLIC_TRANSFER_BLACKLIST` | Comma-separated list of `origin-destination` CAIP IDs to block. | unset |
| `NEXT_PUBLIC_CHAIN_WALLET_WHITELISTS` | JSON map of chain → allowed wallet names, used to warn users. | `{}` |
| `NEXT_PUBLIC_RPC_OVERRIDES` | JSON object of RPC URLs per chain when you need bespoke endpoints. | unset |
| `NEXT_PUBLIC_SENTRY_DSN` | Enables Sentry client + server instrumentation when provided. | unset |
# Check code types
pnpm run typecheck
```

## Architecture & key folders

Expand All @@ -104,6 +101,10 @@ All env vars can be added to `.env.local` (for dev) or the hosting platform. The
- `src/features/sanctions` & `src/features/limits` – Reusable guards for sanctioned addresses and per-route amount caps.
- `src/consts` – App-wide configuration (`config.ts`), registry/chain definitions, tip/branding toggles, and global lists (blacklist, warp route whitelist).
- `CUSTOMIZE.md` – Step-by-step guide for branding, token lists, chain metadata, and asset replacement.
```sh
# Format code using Prettier
pnpm run prettier
```

## Customization & feature flags

Expand Down
Loading
Loading