Skip to content

Commit

Permalink
feat: Royco + berachain integration (#1577)
Browse files Browse the repository at this point in the history
Co-authored-by: Denny San <[email protected]>
Co-authored-by: Thomas Cherret <[email protected]>
Co-authored-by: dennyscode <[email protected]>
Co-authored-by: Bojan Kopunovic <[email protected]>
Co-authored-by: admsk2 <[email protected]>
Co-authored-by: tche <[email protected]>
Co-authored-by: tche <[email protected]>
  • Loading branch information
8 people authored Jan 10, 2025
1 parent 21fdad2 commit 697dd45
Show file tree
Hide file tree
Showing 188 changed files with 29,085 additions and 17,298 deletions.
4 changes: 4 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ NEXT_PUBLIC_JUMPER_API=http://localhost:3001
NEXT_REVALIDATION_SECRET=
NEXT_PUBLIC_SOLANA_RPC_URI=https://api.devnet.solana.com
WASH_HANDSHAKE=
NEXT_PUBLIC_ROYCO_URL=https://istbjtfzjcnstpzunkje.supabase.co/
NEXT_PUBLIC_ROYCO_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlzdGJqdGZ6amNuc3RwenVua2plIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUwOTk4NDYsImV4cCI6MjAzMDY3NTg0Nn0.1OCizFgWEFXQUeVnQ0NavmTaq0RxYaiJUL2zhlrPDQw
NEXT_PUBLIC_ROYCO_ID=0df46115-3ae5-423c-abe7-7d17327aed73
NEXT_PUBLIC_ROYCO_FRONTEND_FEE_RECIPIENT=0x91aD352C1e419E6AA579F6a9307A7D88b28a147C
4 changes: 4 additions & 0 deletions .env.localhost
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ NEXT_PUBLIC_JUMPER_API=http://localhost:3001
NEXT_REVALIDATION_SECRET=
NEXT_PUBLIC_SOLANA_RPC_URI=https://api.devnet.solana.com
WASH_HANDSHAKE=secure-key
NEXT_PUBLIC_ROYCO_URL=https://istbjtfzjcnstpzunkje.supabase.co/
NEXT_PUBLIC_ROYCO_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlzdGJqdGZ6amNuc3RwenVua2plIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUwOTk4NDYsImV4cCI6MjAzMDY3NTg0Nn0.1OCizFgWEFXQUeVnQ0NavmTaq0RxYaiJUL2zhlrPDQw
NEXT_PUBLIC_ROYCO_ID=0df46115-3ae5-423c-abe7-7d17327aed73
NEXT_PUBLIC_ROYCO_FRONTEND_FEE_RECIPIENT=0x91aD352C1e419E6AA579F6a9307A7D88b28a147C
4 changes: 4 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ NEXT_PUBLIC_JUMPER_API=https://nsi2h8qvii.execute-api.eu-central-1.amazonaws.com
NEXT_REVALIDATION_SECRET=
NEXT_PUBLIC_SOLANA_RPC_URI=https://chaotic-restless-putty.solana-mainnet.quiknode.pro/
WASH_HANDSHAKE=
NEXT_PUBLIC_ROYCO_URL=https://istbjtfzjcnstpzunkje.supabase.co/
NEXT_PUBLIC_ROYCO_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlzdGJqdGZ6amNuc3RwenVua2plIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUwOTk4NDYsImV4cCI6MjAzMDY3NTg0Nn0.1OCizFgWEFXQUeVnQ0NavmTaq0RxYaiJUL2zhlrPDQw
NEXT_PUBLIC_ROYCO_ID=0df46115-3ae5-423c-abe7-7d17327aed73
NEXT_PUBLIC_ROYCO_FRONTEND_FEE_RECIPIENT=0x91aD352C1e419E6AA579F6a9307A7D88b28a147C
4 changes: 4 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ NEXT_PUBLIC_JUMPER_API=https://dt83v8pw4d.execute-api.eu-central-1.amazonaws.com
NEXT_REVALIDATION_SECRET=
NEXT_PUBLIC_SOLANA_RPC_URI=https://api.mainnet-beta.solana.com
WASH_HANDSHAKE=
NEXT_PUBLIC_ROYCO_URL=https://istbjtfzjcnstpzunkje.supabase.co/
NEXT_PUBLIC_ROYCO_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImlzdGJqdGZ6amNuc3RwenVua2plIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUwOTk4NDYsImV4cCI6MjAzMDY3NTg0Nn0.1OCizFgWEFXQUeVnQ0NavmTaq0RxYaiJUL2zhlrPDQw
NEXT_PUBLIC_ROYCO_ID=0df46115-3ae5-423c-abe7-7d17327aed73
NEXT_PUBLIC_ROYCO_FRONTEND_FEE_RECIPIENT=0x91aD352C1e419E6AA579F6a9307A7D88b28a147C
8 changes: 5 additions & 3 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Install xvfb server
run: sudo apt-get install xvfb
- name: Install Playwright Browsers
Expand All @@ -30,8 +32,8 @@ jobs:
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: report-${{ matrix.shard }}.json
run: |
yarn build:cache:ci &
yarn run test:ci:e2e \
pnpm build:cache:ci &
pnpm run test:ci:e2e \
--shard ${{ matrix.shard }}/${{ strategy.job-total }} \
--reporter=json
- uses: daun/playwright-report-summary@v3
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

echo "Executing pre-commit scripts"

yarn pre-commit
pnpm pre-commit
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

echo "Executing pre-push scripts"
yarn pre-push
pnpm pre-push
934 changes: 0 additions & 934 deletions .yarn/releases/yarn-4.5.3.cjs

This file was deleted.

21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
FROM node:20 AS builder

ARG ENV_NAME
ENV ENV_NAME $ENV_NAME
ENV ENV_NAME=$ENV_NAME
ARG NEXT_PUBLIC_LATEST_COMMIT_SHA
ENV NEXT_PUBLIC_LATEST_COMMIT_SHA $NEXT_PUBLIC_LATEST_COMMIT_SHA
ENV NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production YARN_VERSION=4.0.1
RUN corepack enable && corepack prepare yarn@${YARN_VERSION}
ENV NEXT_PUBLIC_LATEST_COMMIT_SHA=$NEXT_PUBLIC_LATEST_COMMIT_SHA
ENV NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production PNPM_VERSION=9.15.1
RUN corepack enable && corepack install -g pnpm@${PNPM_VERSION}

WORKDIR /app

COPY . .
RUN rm .env*
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn ./.yarn
RUN yarn install --immutable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
ARG ENV_FILE=.env

ARG SENTRY_AUTH_TOKEN
Expand All @@ -22,13 +21,13 @@ ARG NEXT_PUBLIC_SENTRY_DSN
ENV NEXT_PUBLIC_SENTRY_DSN=$NEXT_PUBLIC_SENTRY_DSN

COPY ./$ENV_FILE ./.env
RUN yarn run build
RUN pnpm build

# Production image, copy all the files and run next
FROM node:20-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NODE_ENV=production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

Expand All @@ -42,7 +41,7 @@ RUN mkdir .next
RUN chown nextjs:nodejs .next

# Fix sharp install for image optimization
RUN yarn add sharp
RUN pnpm install sharp
RUN chown -R nextjs:nodejs /app/node_modules
ENV NEXT_SHARP_PATH="/app/node_modules/sharp"

Expand All @@ -55,7 +54,7 @@ USER nextjs

EXPOSE 3000

ENV PORT 3000
ENV PORT=3000

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ This is the [jumper.exchange](https://jumper.exchange) repository that gets depl
In the root directory run the following commands to get started:

```
yarn
pnpm install
```

to install all dependencies, and choose one of these start commands to start the development vite server and to start building packages in watch mode.

```
yarn dev
yarn dev:local
yarn dev:staging
yarn dev:production
pnpm dev
pnpm dev:local
pnpm dev:staging
pnpm dev:production
```

Please refer to the following descriptions of the dev serve scripts:
Expand Down
10 changes: 10 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ const nextConfig = {
reactStrictMode: true, // Recommended for the `pages` directory, default in `app`.
swcMinify: true,
trailingSlash: false,
productionBrowserSourceMaps: false,
experimental: {
serverSourceMaps: false
},
webpack: (config) => {
config.resolve.extensionAlias = {
'.js': ['.ts', '.tsx', '.js', '.jsx'],
};
config.resolve.fallback = { fs: false, net: false, tls: false };
// Walletconnect configuration is blocking the build, pino-pretty needs to be added as an external
config.externals.push('pino-pretty');
//trying to reduce RAM usage
if (config.cache) {
config.cache = Object.freeze({
type: 'memory',
})
}
return config;
},
images: {
Expand Down
38 changes: 30 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"type": "module",
"private": true,
"repository": "https://github.com/jumperexchange/jumper-exchange",
"packageManager": "[email protected]",
"dependencies": {
"@bigmi/react": "^0.0.6",
"@emotion/cache": "^11.14.0",
Expand All @@ -13,16 +12,18 @@
"@fingerprintjs/fingerprintjs": "^3.4.2",
"@headlessui/react": "^2.2.0",
"@lifi/explorer": "^0.0.4",
"@lifi/sdk": "^3.4.3",
"@lifi/sdk": "3.4.3",
"@lifi/wallet-management": "^3.4.7",
"@lifi/widget": "^3.12.5",
"@lifi/widget": "3.12.5",
"@metaplex-foundation/mpl-core": "^1.1.1",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.2",
"@mui/icons-material": "^5.16.11",
"@mui/lab": "5.0.0-alpha.175",
"@mui/material": "^5.16.11",
"@mui/material-nextjs": "^5.16.8",
"@mui/utils": "^6.2.1",
"@next/third-parties": "^14.2.22",
"@rive-app/react-canvas": "^4.17.1",
"@safe-global/safe-apps-sdk": "^9.1.0",
Expand All @@ -35,17 +36,23 @@
"@solana/web3.js": "^1.95.8",
"@strapi/blocks-react-renderer": "^1.0.1",
"@tanstack/react-query": "^5.62.7",
"@wagmi/core": "2.16.0",
"@widgetbot/react-embed": "^1.9.0",
"accept-language": "^3.0.20",
"blo": "^1.2.0",
"date-fns": "^4.1.0",
"ethers": "^6.13.4",
"fontaine": "^0.5.0",
"framer-motion": "^11.15.0",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
"i18next": "^24.1.0",
"i18next-resources-for-ts": "^1.5.0",
"i18next-resources-to-backend": "^1.2.1",
"next": "^14.2.22",
"immer": "^10.1.1",
"lodash": "^4.17.21",
"motion": "^11.11.17",
"next-i18n-router": "^5.5.1",
"next-themes": "^0.3.0",
"react": "^18.3.1",
Expand All @@ -54,10 +61,14 @@
"react-dom": "^18.3.1",
"react-error-boundary": "^4.1.2",
"react-i18next": "^15.1.4",
"royco": "0.9.146",
"shallow-equal": "^3.1.0",
"sharp": "^0.33.5",
"siwe": "^2.3.2",
"use-immer": "^0.11.0",
"uuid": "^11.0.3",
"viem": "^2.21.55",
"wagmi": "2.14.3",
"zustand": "^5.0.2"
},
"devDependencies": {
Expand All @@ -67,7 +78,9 @@
"@next/eslint-plugin-next": "^14.2.22",
"@playwright/test": "^1.49.1",
"@synthetixio/synpress": "4.0.0-alpha.7",
"@synthetixio/synpress-core": "^0.0.4",
"@types/gtag.js": "^0.0.20",
"@types/lodash": "^4",
"@types/node": "^22.10.2",
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
Expand Down Expand Up @@ -104,11 +117,11 @@
"clean": "rm -rf ./tsconfig.tsbuildinfo",
"lint-staged": "lint-staged",
"typecheck": "tsc --project ./tsconfig.json --noEmit",
"test": "yarn playwright test",
"test": "pnpm playwright test",
"fix:staged-files": "lint-staged --allow-empty",
"fix:all-files": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
"pre-commit": "lint-staged",
"pre-push": "yarn && yarn build",
"pre-push": "pnpm install && pnpm build",
"i18next-resources-for-ts": "i18next-resources-for-ts interface -i ./src/i18n/translations/en -o ./src/i18n/resources.d.ts",
"test:ci:e2e": "xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' npx playwright test",
"test:e2e-real": "npx playwright test --headed",
Expand All @@ -118,11 +131,20 @@
"lint-staged": {
"**/*.(ts|tsx|js)": [
"bash -c tsc --noEmit",
"yarn eslint --fix",
"yarn prettier --write"
"pnpm eslint --fix",
"pnpm prettier --write"
],
"**/*.(md|json)": [
"yarn prettier --write"
"pnpm prettier --write"
]
},
"overrides": {
"wagmi": "2.14.3",
"@wagmi/core": "2.16.0",
"@lifi/wallet-management/@wagmi/core": "2.16.0",
"bigmi/wagmi": "2.14.3",
"@bigmi/client/wagmi": "2.14.3",
"@bigmi/client/@wagmi/core": "2.16.0",
"@metamask/sdk": "0.30.0"
}
}
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default defineConfig({
screenshot: 'only-on-failure',
},
webServer: {
command: 'yarn run dev',
command: 'pnpm run dev',
url: 'http://localhost:3000',
timeout: 200 * 1000,
reuseExistingServer: true,
Expand Down
Loading

0 comments on commit 697dd45

Please sign in to comment.