From 3d739070640aea333b40518fe023a8a0b4d17575 Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Fri, 4 Oct 2024 16:13:22 +0800 Subject: [PATCH 1/8] feat: add support for manta, mode, taiko, & zklink --- apps/storybook/package.json | 2 +- apps/web/package.json | 2 +- packages/graph-client/package.json | 2 +- packages/hooks/package.json | 2 +- packages/notifications/package.json | 2 +- packages/steer-sdk/package.json | 2 +- packages/ui/package.json | 2 +- packages/ui/src/components/currency/Icon.tsx | 4 ++ .../ui/src/components/network-selector.tsx | 6 +- pnpm-lock.yaml | 61 ++++++------------- 10 files changed, 33 insertions(+), 52 deletions(-) diff --git a/apps/storybook/package.json b/apps/storybook/package.json index f7790ff8e3..e548b9ca08 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -19,7 +19,7 @@ "class-variance-authority": "0.7.0", "react": "18.2.0", "react-dom": "18.2.0", - "sushi": "4.0.2" + "sushi": "4.1.1" }, "devDependencies": { "@storybook/addon-a11y": "7.4.6", diff --git a/apps/web/package.json b/apps/web/package.json index 9b23cbba47..afe4b771c9 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -87,7 +87,7 @@ "react-window": "1.8.7", "sharp": "^0.33.5", "strapi-sdk-js": "2.3.3", - "sushi": "4.0.5", + "sushi": "4.1.1", "swr": "2.1.5", "tiny-invariant": "1.3.1", "tronweb": "5.3.2", diff --git a/packages/graph-client/package.json b/packages/graph-client/package.json index f88a2048f3..9ee9c9c45e 100644 --- a/packages/graph-client/package.json +++ b/packages/graph-client/package.json @@ -69,7 +69,7 @@ "graphql": "16.6.0", "graphql-request": "^7.0.1", "json-bigint": "^1.0.0", - "sushi": "4.0.5", + "sushi": "4.1.1", "viem": "2.21.4" }, "devDependencies": { diff --git a/packages/hooks/package.json b/packages/hooks/package.json index ff3d20496e..54738d513d 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -47,7 +47,7 @@ "@types/react-dom": "18.2.6", "react": "18.2.0", "react-dom": "18.2.0", - "sushi": "4.0.5", + "sushi": "4.1.1", "tailwindcss": "3.3.2", "typescript": "5.5.4" }, diff --git a/packages/notifications/package.json b/packages/notifications/package.json index b04713a2a5..55c3105bfa 100644 --- a/packages/notifications/package.json +++ b/packages/notifications/package.json @@ -54,7 +54,7 @@ "@tsconfig/strictest": "2.0.2", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", - "sushi": "4.0.5", + "sushi": "4.1.1", "typescript": "5.5.4" }, "peerDependencies": { diff --git a/packages/steer-sdk/package.json b/packages/steer-sdk/package.json index 14b9dacb54..1ccc0986a7 100644 --- a/packages/steer-sdk/package.json +++ b/packages/steer-sdk/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@steerprotocol/contracts": "2.1.0-beta.14", - "sushi": "4.0.5", + "sushi": "4.1.1", "tslib": "latest", "viem": "2.21.4" }, diff --git a/packages/ui/package.json b/packages/ui/package.json index ed43e43582..39ddba7070 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -121,7 +121,7 @@ "postcss": "8.4.23", "react": "18.2.0", "react-dom": "18.2.0", - "sushi": "4.0.5", + "sushi": "4.1.1", "tailwindcss": "3.3.2", "typescript": "5.5.4", "wagmi": "2.12.10" diff --git a/packages/ui/src/components/currency/Icon.tsx b/packages/ui/src/components/currency/Icon.tsx index 91bc9e7464..b2e1dd95fc 100644 --- a/packages/ui/src/components/currency/Icon.tsx +++ b/packages/ui/src/components/currency/Icon.tsx @@ -86,6 +86,10 @@ const LOGO: Record = { [ChainId.BLAST]: EthereumLogo, [ChainId.ROOTSTOCK]: BitcoinLogo, [ChainId.MANTLE]: MntLogo, + [ChainId.MANTA]: EthereumLogo, + [ChainId.MODE]: EthereumLogo, + [ChainId.TAIKO]: EthereumLogo, + [ChainId.ZKLINK]: EthereumLogo, } // function djb2(str: string) { diff --git a/packages/ui/src/components/network-selector.tsx b/packages/ui/src/components/network-selector.tsx index 592e76ee5e..ce54a96d1c 100644 --- a/packages/ui/src/components/network-selector.tsx +++ b/packages/ui/src/components/network-selector.tsx @@ -62,8 +62,10 @@ export interface NetworkSelectorProps { } const NEW_CHAINS: number[] = [ - ChainId.ZKSYNC_ERA, - ChainId.MANTLE, + ChainId.MANTA, + ChainId.MODE, + ChainId.TAIKO, + ChainId.ZKLINK, ] satisfies ChainId[] function Aptos() { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8640523153..811cff9f0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -106,8 +106,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) sushi: - specifier: 4.0.2 - version: 4.0.2(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) devDependencies: '@storybook/addon-a11y': specifier: 7.4.6 @@ -395,8 +395,8 @@ importers: specifier: 2.3.3 version: 2.3.3 sushi: - specifier: 4.0.5 - version: 4.0.5(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) swr: specifier: 2.1.5 version: 2.1.5(react@18.2.0) @@ -583,8 +583,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 sushi: - specifier: 4.0.5 - version: 4.0.5(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) viem: specifier: 2.21.4 version: 2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(zod@3.23.8) @@ -645,8 +645,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) sushi: - specifier: 4.0.5 - version: 4.0.5(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) tailwindcss: specifier: 3.3.2 version: 3.3.2(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) @@ -691,8 +691,8 @@ importers: specifier: 18.2.6 version: 18.2.6 sushi: - specifier: 4.0.5 - version: 4.0.5(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) typescript: specifier: 5.5.4 version: 5.5.4 @@ -703,8 +703,8 @@ importers: specifier: 2.1.0-beta.14 version: 2.1.0-beta.14(bufferutil@4.0.8)(encoding@0.1.13)(squirrelly@8.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) sushi: - specifier: 4.0.5 - version: 4.0.5(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) tslib: specifier: latest version: 2.6.2 @@ -962,8 +962,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) sushi: - specifier: 4.0.5 - version: 4.0.5(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.1 + version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) tailwindcss: specifier: 3.3.2 version: 3.3.2(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) @@ -15008,19 +15008,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - sushi@4.0.2: - resolution: {integrity: sha512-yu90jzqc2Ki3Zn9gygDW2AP4RUJ/+YNEP0pfJIpE5eTxRlDcRcbd/8qoZEeknFMfGe7BWp7e2tu2vfs2E4mNuA==} - peerDependencies: - viem: '*' - zod: '*' - peerDependenciesMeta: - viem: - optional: true - zod: - optional: true - - sushi@4.0.5: - resolution: {integrity: sha512-PRk3UKD3TyoS+IkAQJVxpjuAz+lhdqu0zbaFLTGe6/spk+eaeCkBvYu10r9R/2qXamA3D89KTHLKehGDh+E3lQ==} + sushi@4.1.1: + resolution: {integrity: sha512-mP+2MdOWt/qfIhikDmeY+lrT7kDrMVzq6i5zUkMLxJa5Lr9x1UyjlwJAuOR9/YwfjdaVtv0H2N/lCIhTyAbORw==} peerDependencies: typescript: 5.5.4 viem: '*' @@ -35505,21 +35494,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - sushi@4.0.2(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): - dependencies: - '@uniswap/token-lists': 1.0.0-beta.33 - big.js: 6.1.1 - date-fns: 3.3.1 - decimal.js-light: 2.5.1 - seedrandom: 3.0.5 - tiny-invariant: 1.3.1 - toformat: 2.0.0 - tsx: 4.19.0 - optionalDependencies: - viem: 2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8) - zod: 3.23.8 - - sushi@4.0.5(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): + sushi@4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): dependencies: '@uniswap/token-lists': 1.0.0-beta.33 big.js: 6.1.1 @@ -35533,7 +35508,7 @@ snapshots: viem: 2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8) zod: 3.23.8 - sushi@4.0.5(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8): + sushi@4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8): dependencies: '@uniswap/token-lists': 1.0.0-beta.33 big.js: 6.1.1 From 3a3e7adb16d32f66f3ad4f1f560bd551175e95cf Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Tue, 8 Oct 2024 03:33:34 +0800 Subject: [PATCH 2/8] feat: network icons --- .../src/icons/network/circle/MantaCircle.tsx | 8 +++++ .../src/icons/network/circle/ModeCircle.tsx | 11 +++++++ .../src/icons/network/circle/TaikoCircle.tsx | 11 +++++++ .../src/icons/network/circle/ZKLinkCircle.tsx | 11 +++++++ .../ui/src/icons/network/circle/index.tsx | 12 +++++++ .../ui/src/icons/network/naked/MantaNaked.tsx | 33 +++++++++++++++++++ .../ui/src/icons/network/naked/ModeNaked.tsx | 20 +++++++++++ .../ui/src/icons/network/naked/TaikoNaked.tsx | 16 +++++++++ .../src/icons/network/naked/ZKLinkNaked.tsx | 30 +++++++++++++++++ packages/ui/src/icons/network/naked/index.tsx | 12 +++++++ 10 files changed, 164 insertions(+) create mode 100644 packages/ui/src/icons/network/circle/MantaCircle.tsx create mode 100644 packages/ui/src/icons/network/circle/ModeCircle.tsx create mode 100644 packages/ui/src/icons/network/circle/TaikoCircle.tsx create mode 100644 packages/ui/src/icons/network/circle/ZKLinkCircle.tsx create mode 100644 packages/ui/src/icons/network/naked/MantaNaked.tsx create mode 100644 packages/ui/src/icons/network/naked/ModeNaked.tsx create mode 100644 packages/ui/src/icons/network/naked/TaikoNaked.tsx create mode 100644 packages/ui/src/icons/network/naked/ZKLinkNaked.tsx diff --git a/packages/ui/src/icons/network/circle/MantaCircle.tsx b/packages/ui/src/icons/network/circle/MantaCircle.tsx new file mode 100644 index 0000000000..91889a7ab8 --- /dev/null +++ b/packages/ui/src/icons/network/circle/MantaCircle.tsx @@ -0,0 +1,8 @@ +import * as React from 'react' + +import { NakedNetworkIconComponent } from '../../../types' +import { MantaNaked } from '../naked/MantaNaked' + +export const MantaCircle: NakedNetworkIconComponent = (props) => ( + +) diff --git a/packages/ui/src/icons/network/circle/ModeCircle.tsx b/packages/ui/src/icons/network/circle/ModeCircle.tsx new file mode 100644 index 0000000000..63c5739016 --- /dev/null +++ b/packages/ui/src/icons/network/circle/ModeCircle.tsx @@ -0,0 +1,11 @@ +import * as React from 'react' + +import { IconComponent } from '../../../types' +import { ModeNaked } from '../naked/ModeNaked' + +export const ModeCircle: IconComponent = (props) => ( + } + /> +) diff --git a/packages/ui/src/icons/network/circle/TaikoCircle.tsx b/packages/ui/src/icons/network/circle/TaikoCircle.tsx new file mode 100644 index 0000000000..478a6ae3dd --- /dev/null +++ b/packages/ui/src/icons/network/circle/TaikoCircle.tsx @@ -0,0 +1,11 @@ +import * as React from 'react' + +import { IconComponent } from '../../../types' +import { TaikoNaked } from '../naked/TaikoNaked' + +export const TaikoCircle: IconComponent = (props) => ( + } + /> +) diff --git a/packages/ui/src/icons/network/circle/ZKLinkCircle.tsx b/packages/ui/src/icons/network/circle/ZKLinkCircle.tsx new file mode 100644 index 0000000000..cde1668e5c --- /dev/null +++ b/packages/ui/src/icons/network/circle/ZKLinkCircle.tsx @@ -0,0 +1,11 @@ +import * as React from 'react' + +import { IconComponent } from '../../../types' +import { ZKLinkNaked } from '../naked/ZKLinkNaked' + +export const ZKLinkCircle: IconComponent = (props) => ( + } + /> +) diff --git a/packages/ui/src/icons/network/circle/index.tsx b/packages/ui/src/icons/network/circle/index.tsx index 7df2044de4..c6f2894509 100644 --- a/packages/ui/src/icons/network/circle/index.tsx +++ b/packages/ui/src/icons/network/circle/index.tsx @@ -24,8 +24,10 @@ import { HarmonyCircle } from './HarmonyCircle' import { HecoCircle } from './HecoCircle' import { KavaCircle } from './KavaCircle' import { LineaCircle } from './LineaCircle' +import { MantaCircle } from './MantaCircle' import { MantleCircle } from './MantleCircle' import { MetisCircle } from './MetisCircle' +import { ModeCircle } from './ModeCircle' import { MoonbeamCircle } from './MoonbeamCircle' import { MoonriverCircle } from './MoonriverCircle' import { OkexCircle } from './OkexCircle' @@ -36,8 +38,10 @@ import { PolygonZKCircle } from './PolygonZKCircle' import { RootstockCircle } from './RootstockCircle' import { ScrollCircle } from './ScrollCircle' import { SkaleCircle } from './SkaleCircle' +import { TaikoCircle } from './TaikoCircle' import { TelosCircle } from './TelosCircle' import { ThunderCoreCircle } from './ThunderCoreCircle' +import { ZKLinkCircle } from './ZKLinkCircle' import { ZKSyncCircle } from './ZKSyncCircle' import { ZetaChainCircle } from './ZetaChainCircle' @@ -65,8 +69,10 @@ export * from './HarmonyCircle' export * from './HecoCircle' export * from './KavaCircle' export * from './LineaCircle' +export * from './MantaCircle' export * from './MantleCircle' export * from './MetisCircle' +export * from './ModeCircle' export * from './MoonbeamCircle' export * from './MoonriverCircle' export * from './OkexCircle' @@ -77,9 +83,11 @@ export * from './PolygonZKCircle' export * from './RootstockCircle' export * from './ScrollCircle' export * from './SkaleCircle' +export * from './TaikoCircle' export * from './TelosCircle' export * from './ThunderCoreCircle' export * from './TronCircle' +export * from './ZKLinkCircle' export * from './ZKSyncCircle' export * from './ZetaChainCircle' @@ -123,4 +131,8 @@ export const NETWORK_CIRCLE_ICON: Partial> = { [ChainId.ROOTSTOCK]: RootstockCircle, [ChainId.CRONOS]: CronosCircle, [ChainId.MANTLE]: MantleCircle, + [ChainId.MANTA]: MantaCircle, + [ChainId.MODE]: ModeCircle, + [ChainId.TAIKO]: TaikoCircle, + [ChainId.ZKLINK]: ZKLinkCircle, } diff --git a/packages/ui/src/icons/network/naked/MantaNaked.tsx b/packages/ui/src/icons/network/naked/MantaNaked.tsx new file mode 100644 index 0000000000..3b6d5983af --- /dev/null +++ b/packages/ui/src/icons/network/naked/MantaNaked.tsx @@ -0,0 +1,33 @@ +import * as React from 'react' + +import { NakedNetworkIconComponent } from '../../../types' + +export const MantaNaked: NakedNetworkIconComponent = (props) => ( + + + + + + + + + + +) diff --git a/packages/ui/src/icons/network/naked/ModeNaked.tsx b/packages/ui/src/icons/network/naked/ModeNaked.tsx new file mode 100644 index 0000000000..53d89ee278 --- /dev/null +++ b/packages/ui/src/icons/network/naked/ModeNaked.tsx @@ -0,0 +1,20 @@ +import React from 'react' + +import { NakedNetworkIconComponent } from '../../../types' + +export const ModeNaked: NakedNetworkIconComponent = ({ circle, ...props }) => { + return ( + + {circle ? circle : } + + + ) +} diff --git a/packages/ui/src/icons/network/naked/TaikoNaked.tsx b/packages/ui/src/icons/network/naked/TaikoNaked.tsx new file mode 100644 index 0000000000..b550510e48 --- /dev/null +++ b/packages/ui/src/icons/network/naked/TaikoNaked.tsx @@ -0,0 +1,16 @@ +import React from 'react' + +import { NakedNetworkIconComponent } from '../../../types' + +export const TaikoNaked: NakedNetworkIconComponent = ({ circle, ...props }) => { + return ( + + {circle ? circle : } + + + ) +} diff --git a/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx b/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx new file mode 100644 index 0000000000..b245934828 --- /dev/null +++ b/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx @@ -0,0 +1,30 @@ +import * as React from 'react' + +import { NakedNetworkIconComponent } from '../../../types' + +export const ZKLinkNaked: NakedNetworkIconComponent = ({ + circle, + ...props +}) => ( + + {circle ? circle : } + + + +) diff --git a/packages/ui/src/icons/network/naked/index.tsx b/packages/ui/src/icons/network/naked/index.tsx index bbccdfd5a6..2772ef8ba3 100644 --- a/packages/ui/src/icons/network/naked/index.tsx +++ b/packages/ui/src/icons/network/naked/index.tsx @@ -24,8 +24,10 @@ import { HarmonyNaked } from './HarmonyNaked' import { HecoNaked } from './HecoNaked' import { KavaNaked } from './KavaNaked' import { LineaNaked } from './LineaNaked' +import { MantaNaked } from './MantaNaked' import { MantleNaked } from './MantleNaked' import { MetisNaked } from './MetisNaked' +import { ModeNaked } from './ModeNaked' import { MoonbeamNaked } from './MoonbeamNaked' import { MoonriverNaked } from './MoonriverNaked' import { OkexNaked } from './OkexNaked' @@ -36,8 +38,10 @@ import { PolygonZKNaked } from './PolygonZKNaked' import { RootstockNaked } from './RootstockNaked' import { ScrollNaked } from './ScrollNaked' import { SkaleNaked } from './SkaleNaked' +import { TaikoNaked } from './TaikoNaked' import { TelosNaked } from './TelosNaked' import { ThunderCoreNaked } from './ThunderCoreNaked' +import { ZKLinkNaked } from './ZKLinkNaked' import { ZKSyncNaked } from './ZKSyncNaked' import { ZetaChainNaked } from './ZetaChainNaked' @@ -64,8 +68,10 @@ export * from './HarmonyNaked' export * from './HecoNaked' export * from './KavaNaked' export * from './LineaNaked' +export * from './MantaNaked' export * from './MantleNaked' export * from './MetisNaked' +export * from './ModeNaked' export * from './MoonbeamNaked' export * from './MoonriverNaked' export * from './OkexNaked' @@ -76,8 +82,10 @@ export * from './PolygonZKNaked' export * from './RootstockNaked' export * from './ScrollNaked' export * from './SkaleNaked' +export * from './TaikoNaked' export * from './TelosNaked' export * from './TronNaked' +export * from './ZKLinkNaked' export * from './ZKSyncNaked' export * from './ZetaChainNaked' @@ -121,4 +129,8 @@ export const NETWORK_NAKED_ICON: Partial> = { [ChainId.ROOTSTOCK]: RootstockNaked, [ChainId.CRONOS]: CronosNaked, [ChainId.MANTLE]: MantleNaked, + [ChainId.MANTA]: MantaNaked, + [ChainId.MODE]: ModeNaked, + [ChainId.TAIKO]: TaikoNaked, + [ChainId.ZKLINK]: ZKLinkNaked, } From f66f6938a21586616c075dffacdc8e43c9ff90ee Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Tue, 8 Oct 2024 03:33:46 +0800 Subject: [PATCH 3/8] chore: bump sushi pkg --- apps/storybook/package.json | 2 +- apps/web/package.json | 2 +- packages/graph-client/package.json | 2 +- packages/hooks/package.json | 2 +- packages/notifications/package.json | 2 +- packages/steer-sdk/package.json | 2 +- packages/ui/package.json | 2 +- pnpm-lock.yaml | 38 ++++++++++++++--------------- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/apps/storybook/package.json b/apps/storybook/package.json index e548b9ca08..fc61941224 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -19,7 +19,7 @@ "class-variance-authority": "0.7.0", "react": "18.2.0", "react-dom": "18.2.0", - "sushi": "4.1.1" + "sushi": "4.1.3" }, "devDependencies": { "@storybook/addon-a11y": "7.4.6", diff --git a/apps/web/package.json b/apps/web/package.json index afe4b771c9..01e26c1392 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -87,7 +87,7 @@ "react-window": "1.8.7", "sharp": "^0.33.5", "strapi-sdk-js": "2.3.3", - "sushi": "4.1.1", + "sushi": "4.1.3", "swr": "2.1.5", "tiny-invariant": "1.3.1", "tronweb": "5.3.2", diff --git a/packages/graph-client/package.json b/packages/graph-client/package.json index 9ee9c9c45e..3366caf85e 100644 --- a/packages/graph-client/package.json +++ b/packages/graph-client/package.json @@ -69,7 +69,7 @@ "graphql": "16.6.0", "graphql-request": "^7.0.1", "json-bigint": "^1.0.0", - "sushi": "4.1.1", + "sushi": "4.1.3", "viem": "2.21.4" }, "devDependencies": { diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 54738d513d..a5983969f8 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -47,7 +47,7 @@ "@types/react-dom": "18.2.6", "react": "18.2.0", "react-dom": "18.2.0", - "sushi": "4.1.1", + "sushi": "4.1.3", "tailwindcss": "3.3.2", "typescript": "5.5.4" }, diff --git a/packages/notifications/package.json b/packages/notifications/package.json index 55c3105bfa..b96c469ee9 100644 --- a/packages/notifications/package.json +++ b/packages/notifications/package.json @@ -54,7 +54,7 @@ "@tsconfig/strictest": "2.0.2", "@types/react": "18.2.14", "@types/react-dom": "18.2.6", - "sushi": "4.1.1", + "sushi": "4.1.3", "typescript": "5.5.4" }, "peerDependencies": { diff --git a/packages/steer-sdk/package.json b/packages/steer-sdk/package.json index 1ccc0986a7..3af145ee5f 100644 --- a/packages/steer-sdk/package.json +++ b/packages/steer-sdk/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@steerprotocol/contracts": "2.1.0-beta.14", - "sushi": "4.1.1", + "sushi": "4.1.3", "tslib": "latest", "viem": "2.21.4" }, diff --git a/packages/ui/package.json b/packages/ui/package.json index 39ddba7070..7d2bd67a1f 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -121,7 +121,7 @@ "postcss": "8.4.23", "react": "18.2.0", "react-dom": "18.2.0", - "sushi": "4.1.1", + "sushi": "4.1.3", "tailwindcss": "3.3.2", "typescript": "5.5.4", "wagmi": "2.12.10" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 811cff9f0a..2fe2bb4056 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -106,8 +106,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) devDependencies: '@storybook/addon-a11y': specifier: 7.4.6 @@ -395,8 +395,8 @@ importers: specifier: 2.3.3 version: 2.3.3 sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) swr: specifier: 2.1.5 version: 2.1.5(react@18.2.0) @@ -583,8 +583,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) viem: specifier: 2.21.4 version: 2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(zod@3.23.8) @@ -645,8 +645,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) tailwindcss: specifier: 3.3.2 version: 3.3.2(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) @@ -691,8 +691,8 @@ importers: specifier: 18.2.6 version: 18.2.6 sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) typescript: specifier: 5.5.4 version: 5.5.4 @@ -703,8 +703,8 @@ importers: specifier: 2.1.0-beta.14 version: 2.1.0-beta.14(bufferutil@4.0.8)(encoding@0.1.13)(squirrelly@8.0.8)(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4)(utf-8-validate@5.0.10) sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) tslib: specifier: latest version: 2.6.2 @@ -962,8 +962,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) sushi: - specifier: 4.1.1 - version: 4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.3 + version: 4.1.3(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8) tailwindcss: specifier: 3.3.2 version: 3.3.2(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4)) @@ -15008,11 +15008,11 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - sushi@4.1.1: - resolution: {integrity: sha512-mP+2MdOWt/qfIhikDmeY+lrT7kDrMVzq6i5zUkMLxJa5Lr9x1UyjlwJAuOR9/YwfjdaVtv0H2N/lCIhTyAbORw==} + sushi@4.1.3: + resolution: {integrity: sha512-wQ9y/6u4R4g3njYL27eOIyty5xGD2pA1ABLE9uLXDcHK97XzMc/lFAhsvSaiw6qbSm8QibmOeGlJdDmR75pLNg==} peerDependencies: typescript: 5.5.4 - viem: '*' + viem: 2.21.4 zod: '*' peerDependenciesMeta: typescript: @@ -35494,7 +35494,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - sushi@4.1.1(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): + sushi@4.1.3(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8))(zod@3.23.8): dependencies: '@uniswap/token-lists': 1.0.0-beta.33 big.js: 6.1.1 @@ -35508,7 +35508,7 @@ snapshots: viem: 2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8) zod: 3.23.8 - sushi@4.1.1(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8): + sushi@4.1.3(typescript@5.5.4)(viem@2.21.4(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8): dependencies: '@uniswap/token-lists': 1.0.0-beta.33 big.js: 6.1.1 From c6a072062c0ce96f24b49ddc879458596d3697ea Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Tue, 8 Oct 2024 03:39:05 +0800 Subject: [PATCH 4/8] chore: cleanup --- packages/graph-client/package.json | 2 +- pnpm-lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graph-client/package.json b/packages/graph-client/package.json index 62be4cd78f..70e3513ccf 100644 --- a/packages/graph-client/package.json +++ b/packages/graph-client/package.json @@ -68,7 +68,7 @@ "gql.tada": "1.7.5", "graphql": "16.6.0", "graphql-request": "7.1.0", - "json-bigint": "^1.0.0", + "json-bigint": "1.0.0", "sushi": "4.1.3", "viem": "2.21.4" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f83c885dd5..82f4bf206c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -579,7 +579,7 @@ importers: specifier: 7.1.0 version: 7.1.0(@dprint/formatter@0.3.0)(graphql@16.6.0) json-bigint: - specifier: ^1.0.0 + specifier: 1.0.0 version: 1.0.0 sushi: specifier: 4.1.3 From 14e588159396b09f309cac63fc8ed1ca4253485b Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Tue, 8 Oct 2024 23:43:09 +0800 Subject: [PATCH 5/8] chore: update types --- .../src/subgraphs/data-api/types/TokenListChainId.ts | 2 +- .../src/subgraphs/data-api/types/TrendingTokensChainId.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/graph-client/src/subgraphs/data-api/types/TokenListChainId.ts b/packages/graph-client/src/subgraphs/data-api/types/TokenListChainId.ts index f46193bfa0..ecc28eccfb 100644 --- a/packages/graph-client/src/subgraphs/data-api/types/TokenListChainId.ts +++ b/packages/graph-client/src/subgraphs/data-api/types/TokenListChainId.ts @@ -1,6 +1,6 @@ // This file is auto-generated by scripts/update-data-api-types.ts import type { ChainId } from 'sushi/chain' -export const TokenListChainIds = [42161,42170,43114,8453,288,56288,56,42220,1,250,122,100,11235,1666600000,1284,1285,137,534352,2222,1088,199,314,7000,1116,108,10,59144,1101,81457,2046399126,30,11155111,25,5000,324] as const +export const TokenListChainIds = [42161,42170,43114,8453,288,56288,56,42220,1,250,122,100,11235,1666600000,1284,1285,137,534352,2222,1088,199,314,7000,1116,108,10,59144,1101,81457,2046399126,30,11155111,25,5000,324,169,34443,167000,810180] as const export type TokenListChainId = typeof TokenListChainIds[number] export function isTokenListChainId(value: ChainId): value is TokenListChainId {return TokenListChainIds.includes(value as TokenListChainId)} \ No newline at end of file diff --git a/packages/graph-client/src/subgraphs/data-api/types/TrendingTokensChainId.ts b/packages/graph-client/src/subgraphs/data-api/types/TrendingTokensChainId.ts index c620b8a939..7b5fca2b54 100644 --- a/packages/graph-client/src/subgraphs/data-api/types/TrendingTokensChainId.ts +++ b/packages/graph-client/src/subgraphs/data-api/types/TrendingTokensChainId.ts @@ -1,6 +1,6 @@ // This file is auto-generated by scripts/update-data-api-types.ts import type { ChainId } from 'sushi/chain' -export const TrendingTokensChainIds = [42161,42170,43114,8453,288,56288,56,42220,1,250,122,100,1666600000,1284,137,534352,2222,1088,199,7000,1116,108,10,59144,1101,81457,2046399126,30,25,5000,324] as const +export const TrendingTokensChainIds = [42161,42170,43114,8453,288,56288,56,42220,1,250,122,100,1666600000,1284,137,534352,2222,1088,199,7000,1116,108,10,59144,1101,81457,2046399126,30,25,5000,324,169,34443,167000,810180] as const export type TrendingTokensChainId = typeof TrendingTokensChainIds[number] export function isTrendingTokensChainId(value: ChainId): value is TrendingTokensChainId {return TrendingTokensChainIds.includes(value as TrendingTokensChainId)} \ No newline at end of file From 91fc488ea39c5ed86245760f70c9c21cfbb122db Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Thu, 17 Oct 2024 18:11:04 +0900 Subject: [PATCH 6/8] fix: svg warnings --- packages/ui/src/icons/SushiLiteIcon.tsx | 8 ++++---- packages/ui/src/icons/network/naked/MantaNaked.tsx | 10 +++++----- packages/ui/src/icons/network/naked/TaikoNaked.tsx | 2 +- packages/ui/src/icons/network/naked/ZKLinkNaked.tsx | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/ui/src/icons/SushiLiteIcon.tsx b/packages/ui/src/icons/SushiLiteIcon.tsx index b2dc93f12c..f3d7ac47d5 100644 --- a/packages/ui/src/icons/SushiLiteIcon.tsx +++ b/packages/ui/src/icons/SushiLiteIcon.tsx @@ -11,14 +11,14 @@ export const SushiLiteIcon: IconComponent = (props) => { xmlns="http://www.w3.org/2000/svg" > diff --git a/packages/ui/src/icons/network/naked/MantaNaked.tsx b/packages/ui/src/icons/network/naked/MantaNaked.tsx index 3b6d5983af..ba91b8faf9 100644 --- a/packages/ui/src/icons/network/naked/MantaNaked.tsx +++ b/packages/ui/src/icons/network/naked/MantaNaked.tsx @@ -10,8 +10,8 @@ export const MantaNaked: NakedNetworkIconComponent = (props) => ( {...props} > @@ -24,9 +24,9 @@ export const MantaNaked: NakedNetworkIconComponent = (props) => ( y2="23.556" gradientUnits="userSpaceOnUse" > - - - + + + diff --git a/packages/ui/src/icons/network/naked/TaikoNaked.tsx b/packages/ui/src/icons/network/naked/TaikoNaked.tsx index b550510e48..a0e93538b9 100644 --- a/packages/ui/src/icons/network/naked/TaikoNaked.tsx +++ b/packages/ui/src/icons/network/naked/TaikoNaked.tsx @@ -9,7 +9,7 @@ export const TaikoNaked: NakedNetworkIconComponent = ({ circle, ...props }) => { ) diff --git a/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx b/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx index b245934828..e361c593cc 100644 --- a/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx +++ b/packages/ui/src/icons/network/naked/ZKLinkNaked.tsx @@ -14,17 +14,17 @@ export const ZKLinkNaked: NakedNetworkIconComponent = ({ > {circle ? circle : } ) From 5d443b4ccfd348264e380c6dadab4845406c5584 Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Thu, 17 Oct 2024 22:48:01 +0900 Subject: [PATCH 7/8] fix: manta logo --- .../ui/src/icons/network/naked/MantaNaked.tsx | 63 ++++++++++--------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/packages/ui/src/icons/network/naked/MantaNaked.tsx b/packages/ui/src/icons/network/naked/MantaNaked.tsx index ba91b8faf9..4c81cb594e 100644 --- a/packages/ui/src/icons/network/naked/MantaNaked.tsx +++ b/packages/ui/src/icons/network/naked/MantaNaked.tsx @@ -1,33 +1,38 @@ import * as React from 'react' +import { nanoid } from 'nanoid' import { NakedNetworkIconComponent } from '../../../types' -export const MantaNaked: NakedNetworkIconComponent = (props) => ( - - - - - - - - - - -) +export const MantaNaked: NakedNetworkIconComponent = (props) => { + const id = React.useMemo(() => `manta-${nanoid()}`, []) + + return ( + + + + + + + + + + + ) +} From 21e0d9720bef34b6b2c1a3915a8c0038342f5359 Mon Sep 17 00:00:00 2001 From: 0xMasayoshi <0xMasayoshi@protonmail.com> Date: Thu, 31 Oct 2024 17:46:28 +0900 Subject: [PATCH 8/8] chore: add tron to NEW_CHAIN_IDS --- apps/web/src/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/config.ts b/apps/web/src/config.ts index d7b3431039..fea9a14e82 100644 --- a/apps/web/src/config.ts +++ b/apps/web/src/config.ts @@ -71,6 +71,7 @@ export const NEW_CHAIN_IDS = [ ChainId.MODE, ChainId.TAIKO, ChainId.ZKLINK, + NonStandardChainId.TRON, ] as const const PREFERRED_CHAINID_ORDER = [