Skip to content

Commit

Permalink
Merge pull request #2 from helix-bridge/jay/support-bitlayer-testnet
Browse files Browse the repository at this point in the history
Support Bitlayer Testnet
  • Loading branch information
JayJay1024 authored Jul 10, 2024
2 parents 9de3b72 + d3e3402 commit 1044c58
Show file tree
Hide file tree
Showing 84 changed files with 46,346 additions and 2,020 deletions.
24 changes: 24 additions & 0 deletions .env.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ALCHEMY_API_KEY='key'
AMPLITUDE_EXPERIMENTS_DEPLOYMENT_KEY='key'
APPSFLYER_API_KEY='key'
APPSFLYER_APP_ID=123
MOONPAY_API_KEY='key'
MOONPAY_API_URL='https://api.moonpay.com'
MOONPAY_WIDGET_API_URL='https://api.moonpay.com'
INFURA_KEY='key'
INFURA_PROJECT_ID=123
ONESIGNAL_APP_ID=123
QUICKNODE_ARBITRUM_RPC_URL='https://api.uniswap.org'
QUICKNODE_BNB_RPC_URL='https://api.uniswap.org'
QUICKNODE_MAINNET_RPC_URL='https://api.uniswap.org'
QUICKNODE_ZORA_RPC_URL='https://api.uniswap.org'
SENTRY_DSN='http://sentry.com'
SHAKE_CLIENT_ID=123
SHAKE_CLIENT_SECRET=123
SIMPLEHASH_API_KEY='key'
SIMPLEHASH_API_URL='https://api.simplehash.com'
STATSIG_PROXY_URL='https://api.statsig.com'
TRADING_API_KEY='key'
UNISWAP_API_KEY='key'
WALLETCONNECT_PROJECT_ID=2719448e2ce94fdd269a3c8587123bcc
FIREBASE_APP_CHECK_DEBUG_TOKEN='token'
51 changes: 51 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy develop

on:
pull_request:

jobs:
# Build job
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: https://npm.pkg.github.com

- name: Install dependencies
run: |
yarn config set npmAuthToken ${{secrets.GITHUB_TOKEN}}
yarn install --immutable
yarn config unset npmAuthToken
- name: Re-install dependencies
run: |
node ./fix-install.js
yarn config set npmAuthToken ${{secrets.GITHUB_TOKEN}}
yarn install --immutable
yarn config unset npmAuthToken
- name: Build with Next.js
run: yarn web build

- uses: darwinia-network/devops/actions/smart-vercel@main
name: Deploy to Vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
alias_domain: "helixswap-dev"
project_name: uniswap-interface
dist_path: apps/web/build
script_run: false
enable_cache: true
enable_notify_comment: true
enable_notify_slack: true
slack_channel: helix-ui
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

52 changes: 52 additions & 0 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy staging

on:
push:
tags:
- 'v*'

jobs:
# Build job
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: https://npm.pkg.github.com

- name: Install dependencies
run: |
yarn config set npmAuthToken ${{secrets.GITHUB_TOKEN}}
yarn install --immutable
yarn config unset npmAuthToken
- name: Re-install dependencies
run: |
node ./fix-install.js
yarn config set npmAuthToken ${{secrets.GITHUB_TOKEN}}
yarn install --immutable
yarn config unset npmAuthToken
- name: Build with Next.js
run: yarn web build

- uses: darwinia-network/devops/actions/smart-vercel@main
name: Deploy to Vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
project_name: uniswap-interface
dist_path: apps/web/build
prod_mode: true
script_run: false
enable_cache: true
enable_notify_slack: true
slack_channel: helix-ui
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

52 changes: 52 additions & 0 deletions .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy staging

on:
push:
branches: [helixswap/main]

jobs:
# Build job
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: https://npm.pkg.github.com

- name: Install dependencies
run: |
yarn config set npmAuthToken ${{secrets.GITHUB_TOKEN}}
yarn install --immutable
yarn config unset npmAuthToken
- name: Re-install dependencies
run: |
node ./fix-install.js
yarn config set npmAuthToken ${{secrets.GITHUB_TOKEN}}
yarn install --immutable
yarn config unset npmAuthToken
- name: Build with Next.js
run: yarn web build

- uses: darwinia-network/devops/actions/smart-vercel@main
name: Deploy to Vercel
id: smart-vercel
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_group: itering
preview_output: true
alias_domain: "helixswap-stg"
project_name: uniswap-interface
dist_path: apps/web/build
script_run: false
enable_cache: true
enable_notify_slack: true
slack_channel: helix-ui
slack_webhook: ${{ secrets.SLACK_INCOMING_WEBHOOK_URL }}

40 changes: 0 additions & 40 deletions .github/workflows/tag_and_release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn g:run-fast-checks
# yarn g:run-fast-checks
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ plugins:
spec: '@yarnpkg/plugin-constraints'

yarnPath: .yarn/releases/yarn-3.2.3.cjs

npmScopes:
helix-bridge:
npmPublishRegistry: https://npm.pkg.github.com
npmRegistryServer: https://npm.pkg.github.com
7 changes: 4 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@uniswap/interface",
"name": "@helix-bridge/interface",
"version": "1.1.0",
"description": "Uniswap Interface",
"description": "HelixSwap Interface",
"license": "GPL-3.0-or-later",
"scripts": {
"ajv": "node scripts/compile-ajv-validators.js",
Expand All @@ -11,8 +11,9 @@
"i18n:upload": "./scripts/crowdin.sh upload",
"i18n:download": "./scripts/crowdin.sh download",
"i18n:download:if-missing": "ONLY_IF_MISSING=1 ./scripts/crowdin.sh download",
"start": "craco start",
"start": "BROWSER=none craco start",
"start:cloud": "NODE_OPTIONS=--dns-result-order=ipv4first PORT=3001 REACT_APP_SKIP_CSP=1 npx wrangler pages dev --compatibility-flags=nodejs_compat --compatibility-date=2023-08-01 --proxy=3001 --port=3000 -- yarn start",
"build": "craco build",
"build:production": "yarn i18n:download:if-missing && craco build",
"analyze": "source-map-explorer 'build/static/js/*.js' --no-border-checks --gzip",
"serve": "serve build -s -l 3000",
Expand Down
1 change: 1 addition & 0 deletions apps/web/public/csp.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"https://rpc-mumbai.maticvigil.com",
"https://rpc.ankr.com",
"https://rpc.blast.io/",
"https://testnet-rpc.bitlayer.org",
"https://rpc.degen.tips",
"https://rpc.goerli.mudit.blog/",
"https://rpc.mevblocker.io/",
Expand Down
Binary file added apps/web/public/favicon.ico
Binary file not shown.
8 changes: 4 additions & 4 deletions apps/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<head>
<meta charset="utf-8" />

<title>Uniswap Interface</title>
<title>Helix Swap</title>

<!--
%PUBLIC_URL% will be replaced with the URL of the `public` folder during build.
Only files inside the `public` folder can be referenced from the HTML.
-->
<link rel="shortcut icon" type="image/png" href="%PUBLIC_URL%/favicon.png" />
<link rel="apple-touch-icon" sizes="192x192" href="%PUBLIC_URL%/images/192x192_App_Icon.png" />
<link rel="apple-touch-icon" sizes="512x512" href="%PUBLIC_URL%/images/512x512_App_Icon.png" />
<link rel="shortcut icon" type="image/png" href="%PUBLIC_URL%/favicon.ico" />
<!-- <link rel="apple-touch-icon" sizes="192x192" href="%PUBLIC_URL%/images/192x192_App_Icon.png" /> -->
<!-- <link rel="apple-touch-icon" sizes="512x512" href="%PUBLIC_URL%/images/512x512_App_Icon.png" /> -->

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#fff" />
Expand Down
3 changes: 3 additions & 0 deletions apps/web/scripts/compile-ajv-validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const tokenListAjv = new Ajv({ code: { source: true, esm: true } })
addFormats(tokenListAjv)
const validateTokenList = tokenListAjv.compile(schema)
let tokenListModuleCode = standaloneCode(tokenListAjv, validateTokenList)
if (!fs.existsSync(path.join(__dirname, '../src/utils/__generated__'))) {
fs.mkdirSync(path.join(__dirname, '../src/utils/__generated__'), { recursive: true })
}
fs.writeFileSync(path.join(__dirname, '../src/utils/__generated__/validateTokenList.js'), tokenListModuleCode)

const tokensAjv = new Ajv({ code: { source: true, esm: true } })
Expand Down
Binary file added apps/web/src/assets/images/wbtc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions apps/web/src/assets/svg/brc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions apps/web/src/assets/svg/btc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions apps/web/src/assets/svg/wbtc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1044c58

Please sign in to comment.