Skip to content

Commit

Permalink
ard
Browse files Browse the repository at this point in the history
  • Loading branch information
elee1766 committed Jan 7, 2024
1 parent 38a8e7d commit 5e2a07a
Show file tree
Hide file tree
Showing 49 changed files with 12,358 additions and 7 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: all advanced-tools redirects usdc-bridge token-bridge


all:
act --artifact-server-path /tmp/act-artifacts pull_request -s GITHUB_TOKEN=${GITHUB_TOKEN} -P=xlabs-large-runner=catthehacker/ubuntu:act-latest --container-options "--memory=10G"
advanced-tools:
act --artifact-server-path /tmp/act-artifacts pull_request -j advanced-tools -s GITHUB_TOKEN=${GITHUB_TOKEN} -P=xlabs-large-runner=catthehacker/ubuntu:act-latest --container-options "--memory=12g"
redirects:
act --artifact-server-path /tmp/act-artifacts pull_request -j redirects
usdc-bridge:
act --artifact-server-path /tmp/act-artifacts pull_request -j usdc-bridge -s GITHUB_TOKEN=${GITHUB_TOKEN}
token-bridge:
act --artifact-server-path /tmp/act-artifacts pull_request -j token-bridge -s GITHUB_TOKEN=${GITHUB_TOKEN}
rewards-dashboard:
act --artifact-server-path /tmp/act-artifacts pull_request -j rewards-dashboard -s GITHUB_TOKEN=${GITHUB_TOKEN}
4 changes: 2 additions & 2 deletions apps/connect/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/connect/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@xlabs/portal-bridge-ui",
"private": true,
"version": "0.2.6",
"version": "0.2.5",
"type": "module",
"scripts": {
"dev:usdc-bridge": "vite --config ./vite.usdc-bridge.config.ts",
Expand Down
3 changes: 2 additions & 1 deletion apps/connect/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const MAINNET_RPCS = {
}
}


// https://vitejs.dev/config/
export default defineConfig({
base: process.env.PUBLIC_URL || '',
Expand All @@ -34,7 +35,7 @@ export default defineConfig({
}
},
plugins: [
react(),
react(),
viteStaticCopy({
targets: [
{
Expand Down
3 changes: 2 additions & 1 deletion apps/connect/vite.token-bridge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default defineConfig({
...viteConfig?.define,
navBar: [
{ label: "Home", active: true, href: `${PUBLIC_URL}/` },
{ label: "USDC", href: USDC_BRIDGE_HREF }
{ label: "USDC", href: USDC_BRIDGE_HREF },
{ label: "Rewards", href: `${PUBLIC_URL}/rewards-dashboard` }
],
redirects: {
source: [
Expand Down
3 changes: 2 additions & 1 deletion apps/connect/vite.usdc-bridge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export default defineConfig({
...viteConfig?.define,
navBar: [
{ label: "Home", href: `${PUBLIC_URL}/` },
{ label: "USDC", active: true, href: `${PUBLIC_URL}/usdc-bridge` }
{ label: "USDC", active: true, href: `${PUBLIC_URL}/usdc-bridge` },
{ label: "Rewards", href: `${PUBLIC_URL}/rewards-dashboard` }
],
wormholeConnectConfig: {
...viteConfig?.define?.wormholeConnectConfig,
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/faqs/_liquid-markets/matic-sol.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| Token (origin) | Token (target) | Markets | Contract address | Notes |
|----------------|------------------|-----------------------------------------------------------|----------------------------------------------|--------|
| USDC.e | USDCpo(Wormhole) | [Saber](https://app.saber.so), [Jupiter](https://jup.ag/) | E2VmbootbVCBkMNNxKQgCLMS1X3NoGMaYAsufaAsf7M | wpUSDC |
| USDC | USDCpo(Wormhole) | [Saber](https://app.saber.so), [Jupiter](https://jup.ag/) | E2VmbootbVCBkMNNxKQgCLMS1X3NoGMaYAsufaAsf7M | wpUSDC |
| USDT | USDTpo(Wormhole) | [Saber](https://app.saber.so), [Jupiter](https://jup.ag/) | 5goWRao6a3yNC4d6UjMdQxonkCMvKBwdpubU3qhfcdf1 | wpUSDT |
18 changes: 18 additions & 0 deletions apps/rewards-dashboard/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions apps/rewards-dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions apps/rewards-dashboard/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps = true
1 change: 1 addition & 0 deletions apps/rewards-dashboard/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/locales/*
13 changes: 13 additions & 0 deletions apps/rewards-dashboard/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always"
}
30 changes: 30 additions & 0 deletions apps/rewards-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
15 changes: 15 additions & 0 deletions apps/rewards-dashboard/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Arb Rewards Dashboard</title>
</head>
<body class="min-h-screen w-screen bg-[#010619] flex flex-col overflow-x-hidden overflow-y-hidden" >
<div id="root" class="
w-screen max-w-[1440px] grow flex flex-col overflow-y-auto h-screen
px-4 md:px-8
"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions apps/rewards-dashboard/lingui.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { LinguiConfig } from "@lingui/conf";

const config: LinguiConfig = {
locales: ["en"],
catalogs: [
{
path: "<rootDir>/src/locales/{locale}",
include: ["src"],
},
],
};

export default config;
Loading

0 comments on commit 5e2a07a

Please sign in to comment.