Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebased merkl-lite sync #56

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
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
56 changes: 56 additions & 0 deletions .github/workflows/update_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Trigger production deployment

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

defaults:
run:
shell: bash

jobs:
tag-image:
runs-on: ubuntu-latest
env:
IMAGE_URL: europe-west1-docker.pkg.dev/angle-artifacts/angle-docker-registry/merkl-app
steps:
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCLOUD_SECRET_ARTIFACTS }}'
- name: Login to Docker
run: gcloud auth configure-docker europe-west1-docker.pkg.dev
- name: Pull and tag image
run: |
export SHORT_SHA=${GITHUB_SHA:0:7}
export VERSION=${GITHUB_REF#refs/tags/}
docker pull $IMAGE_URL:$SHORT_SHA
docker tag $IMAGE_URL:$SHORT_SHA $IMAGE_URL:$VERSION
docker push $IMAGE_URL:$VERSION
trigger-production-deployment:
runs-on: ubuntu-latest
needs: tag-image
steps:
- name: Install dependencies
run: |
sudo snap install yq
- name: Clone deployments repo
uses: actions/checkout@v3
with:
repository: AngleProtocol/deployments
token: ${{ secrets.ACCESS_TOKEN }}
path: deployments
- name: Modify config.production.yaml and push to deployments
run: |
cd deployments

export VERSION=${GITHUB_REF#refs/tags/}
yq -i '.merkl-app.version = strenv(VERSION)' ./config.production.yaml

git config --global user.email "[email protected]"
git config --global user.name "BaptistG"

git add ./config.production.yaml
git commit -m "Update config.production.yaml with merkl-app version $VERSION"

git push
68 changes: 68 additions & 0 deletions .github/workflows/update_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build image and trigger staging deployment

on:
workflow_dispatch:
push:
branches:
- main

defaults:
run:
shell: bash

jobs:
build-image:
runs-on: ubuntu-latest
env:
IMAGE_URL: europe-west1-docker.pkg.dev/angle-artifacts/angle-docker-registry/merkl-app
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: '${{ secrets.ACCESS_TOKEN }}'
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCLOUD_SECRET_ARTIFACTS }}'
- name: Login to Docker
run: gcloud auth configure-docker europe-west1-docker.pkg.dev
- name: Build image
run: |
export SHORT_SHA=${GITHUB_SHA:0:7}
docker pull $IMAGE_URL:latest || true
docker build --cache-from $IMAGE_URL:latest --tag $IMAGE_URL:$SHORT_SHA --tag $IMAGE_URL:latest .
- name: Push image
run: |
export SHORT_SHA=${GITHUB_SHA:0:7}
docker push $IMAGE_URL:$SHORT_SHA

trigger-staging-deployment:
runs-on: ubuntu-latest
needs: build-image
steps:
- name: Install dependencies
run: |
sudo snap install yq
- name: Clone deployments repo
uses: actions/checkout@v3
with:
repository: AngleProtocol/deployments
token: ${{ secrets.ACCESS_TOKEN }}
path: deployments
- name: Modify config.staging.yaml and push to deployments
run: |
cd deployments

export SHORT_SHA=${GITHUB_SHA:0:7}

yq -i '.merkl-app.version = strenv(SHORT_SHA)' ./config.staging.yaml

git config --global user.email "[email protected]"
git config --global user.name "BaptistG"

git add ./config.staging.yaml
git commit -m "Update config.staging.yaml with merkl-app version $SHORT_SHA"

git push
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.foldingImportsByDefault": true,
"editor.foldingHighlight": true,
"editor.foldingStrategy": "auto",
"files.eol": "\n"
"files.eol": "\n",
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
Binary file modified bun.lockb
Binary file not shown.
146 changes: 97 additions & 49 deletions merkl.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,81 @@ import {
zksync,
} from "viem/chains";
import { eip712WalletActions } from "viem/zksync";
import { coinbaseWallet, walletConnect } from "wagmi/connectors";
import { walletConnect } from "wagmi/connectors";

export default createConfig({
appName: "Merkl",
modes: ["dark", "light"],
defaultTheme: "ignite",
tags: [],
appName: "Puffer",
modes: ["light"],
defaultTheme: "puffer",
deposit: false,
tags: ["puffer"],
opportunityNavigationMode: "direct",
rewardsNavigationMode: "chain",
deposit: true,
themes: {
ignite: {
base: createColoring(["#1755F4", "#FF7900", "#0D1530"], ["#1755F4", "#FF7900", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
tokenSymbolPriority: ["ZK", "USDC", "USDC.e", "ETH", "WETH", "WBTC", "wstETH", "USDT", "USDe", "weETH", "DAI"],
opportunityCellHideTags: ["token", "action"],
rewardsNavigationMode: "opportunity",
opportunityLibraryDefaultView: "table",
// opportunityLibraryExcludeFilters: ["protocol","action"],
opprtunityPercentage: true,
opportunityLibrary: {
defaultView: "table",
views: ["table"], // If you want only one view, this is where you can specify it.
cells: {
hideTags: ["token", "action"],
},
merkl: {
base: createColoring(["#1755F4", "#FF7900", "#0D1530"], ["#1755F4", "#FF7900", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
excludeFilters: ["protocol", "tvl"],
},
supplyCredits: [],
hero: {
bannerOnAllPages: false, // show banner on all pages
invertColors: true, // Light mode: light text on dark background (instead of dark text on light background)
},
opportunityFilters: {
minimumTVL: false,
protocols: false,
displaySelector: false,
},
walletOptions: {
hideInjectedWallets: ["phantom", "coinbase wallet"],
sponsorTransactions: true,
client(c) {
if (c.chain?.id === zksync.id) return c.extend(eip712WalletActions());
},
backoffice: {
base: createColoring(["#8B8D98", "#9984D2", "#000000"], ["#8B8D98", "#9984D2", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
harm: createColoring(["#d22e14", "#d22e14", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
},
chains: [],
opportunity: {
featured: {
enabled: false,
length: 6,
},
library: {
columns: {
action: {
enabled: true,
},
},
},
},
bridge: {
helperLink: "",
},
dashboard: {
liquidityTab: {
enabled: false,
},
},
tagsDetails: {
token: {
visitOpportunities: {
enabled: true,
},
},
},
decimalFormat: {
dollar: "$0,0.##a",
},
themes: {
puffer: {
base: createColoring(["#2A35BD", "#BFFF38", "#FFFFFF"], ["#2A35BD", "#BFFF38", "#FFFFFF"]),
base: createColoring(["#2A35BD", "#BFFF37", "#FFFFFF"], ["#2A35BD", "#BFFF37", "#FFFFFF"]),
info: createColoring(["#2ABDFF", "#2ABDFF", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
good: createColoring(["#40B66B", "#40B66B", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
warn: createColoring(["#ff9600", "#ff9600", "#131620"], ["#FFFFFF", "#40B66B", "white"]),
Expand All @@ -86,6 +127,8 @@ export default createConfig({
spacing: { xs: 2, sm: 4, md: 8, lg: 12, xl: 16 },
radius: { xs: 3, sm: 6, md: 9, lg: 12, xl: 15 },
},
alwaysShowTestTokens: true,
showCopyOpportunityIdToClipboard: true,
images: {
hero: hero,
},
Expand All @@ -100,43 +143,49 @@ export default createConfig({
route: "/opportunities",
key: uuidv4(),
},
// protocols: {
// icon: "RiVipCrown2Fill",
// route: "/protocols",
// key: uuidv4(),
// },
// bridge: {
// icon: "RiCompassesLine",
// route: "/bridge",
// key: uuidv4(),
// },
protocols: {
icon: "RiVipCrown2Fill",
route: "/protocols",
key: crypto.randomUUID(),
},
docs: {
icon: "RiFile4Fill",
external: true,
route: "https://docs.merkl.xyz/",
key: uuidv4(),
key: crypto.randomUUID(),
},
faq: {
icon: "RiQuestionFill",
route: "/faq",
key: uuidv4(),
key: crypto.randomUUID(),
},
// terms: {
// icon: "RiCompassesLine",
// route: "/terms",
// key: uuidv4(),
// key: crypto.randomUUID(),
// },
// privacy: {
// icon: "RiInformationFill",
// route: "/privacy",
// key: uuidv4(),
// key: crypto.randomUUID(),
// },
},
header: {
searchbar: {
enabled: true,
},
opportunities: {
enabled: false,
},
bridge: {
enabled: true,
},
},
socials: {
discord: "",
telegram: "https://t.me/+2T0RNabX2ANkMzAx",
x: "https://x.com/zksyncignite",
github: "",
discord: "https://discord.com/invite/pufferfi",
telegram: "https://t.me/puffer_fi",
x: "https://x.com/puffer_finance",
github: "https://github.com/PufferFinance",
},
links: {
docs: "https://docs.merkl.xyz/",
Expand Down Expand Up @@ -192,17 +241,16 @@ export default createConfig({
},
ssr: true,
connectors: [
coinbaseWallet(),
walletConnect({
customStoragePrefix: "wagmi",
projectId: "26c912aadd2132cd869a5edc00aeea0f",
metadata: {
name: "Merkl Lite",
description: "Merkl Lite",
name: "Puffer",
Copy link
Contributor

@indaviande indaviande Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we keep Merkl infos as default instead of puffers ones?

description: "Puffer",
url: "https://app.merkl.xyz.com",
icons: [],
},
}),
],
},
});
});
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"@ariakit/react": "^0.4.12",
"@elysiajs/eden": "^1.1.3",
"@emotion/css": "^11.13.4",
"@merkl/api": "0.10.188",
"@lifi/widget": "^3.13.1",
"@merkl/api": "0.10.277",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-scroll-area": "^1.2.0",
"@remix-run/dev": "^2.11.2",
Expand All @@ -42,15 +43,16 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-responsive": "^10.0.0",
"react-toastify": "^11.0.2",
"remix-utils": "^7.7.0",
"save": "^2.9.0",
"tailwindcss": "^3.4.12",
"tailwindcss-animate": "^1.0.7",
"typedoc": "^0.26.7",
"uuid": "^11.0.3",
"viem": "2.21.54",
"viem": "2.21.33",
"vite-plugin-dts": "^4.2.1",
"wagmi": "^2.12.29",
"wagmi": "^2.14.6",
"zustand": "^5.0.0-rc.2"
},
"devDependencies": {
Expand Down
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
100644 → 100755
Binary file not shown.
3 changes: 3 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading