diff --git a/apps/storybook/package.json b/apps/storybook/package.json index f7790ff8e3..5f26ef628f 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.9" }, "devDependencies": { "@storybook/addon-a11y": "7.4.6", diff --git a/apps/web/package.json b/apps/web/package.json index 336dd23d29..032dcedd48 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.9", "swr": "2.1.5", "tiny-invariant": "1.3.1", "tronweb": "5.3.2", diff --git a/apps/web/src/config.ts b/apps/web/src/config.ts index e1fc8012aa..7d2dda2530 100644 --- a/apps/web/src/config.ts +++ b/apps/web/src/config.ts @@ -65,7 +65,7 @@ export const DISABLED_CHAIN_IDS = [ // NonStandardChainId.TRON, ] as const -export const NEW_CHAIN_IDS = [] as const +export const NEW_CHAIN_IDS = [ChainId.APE] as const const PREFERRED_CHAINID_ORDER = [ ...NEW_CHAIN_IDS, diff --git a/apps/web/src/lib/wagmi/hooks/approvals/hooks/useTokenRevokeApproval.ts b/apps/web/src/lib/wagmi/hooks/approvals/hooks/useTokenRevokeApproval.ts index 20b889fa50..6b4b05c517 100644 --- a/apps/web/src/lib/wagmi/hooks/approvals/hooks/useTokenRevokeApproval.ts +++ b/apps/web/src/lib/wagmi/hooks/approvals/hooks/useTokenRevokeApproval.ts @@ -2,8 +2,9 @@ import { createErrorToast, createToast } from '@sushiswap/notifications' import { useCallback, useMemo, useState } from 'react' +import { erc20Abi_approve } from 'sushi/abi' import { Token } from 'sushi/currency' -import { Address, UserRejectedRequestError, erc20Abi } from 'viem' +import { Address, UserRejectedRequestError } from 'viem' import { usePublicClient, useSimulateContract, useWriteContract } from 'wagmi' import { SendTransactionReturnType } from 'wagmi/actions' @@ -22,7 +23,7 @@ export const useTokenRevokeApproval = ({ const client = usePublicClient() const { data: simulation } = useSimulateContract({ address: token?.wrapped.address as Address, - abi: erc20Abi, + abi: erc20Abi_approve, chainId: token?.chainId, functionName: 'approve', args: [spender, 0n], diff --git a/packages/graph-client/package.json b/packages/graph-client/package.json index f91e7aca0a..28414d60b7 100644 --- a/packages/graph-client/package.json +++ b/packages/graph-client/package.json @@ -69,7 +69,7 @@ "graphql": "16.6.0", "graphql-request": "7.1.0", "json-bigint": "1.0.0", - "sushi": "4.0.5", + "sushi": "4.1.9", "viem": "2.21.4" }, "devDependencies": { 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..ac8038cd59 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,33139] 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..c1304839b5 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,33139] 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 diff --git a/packages/hooks/package.json b/packages/hooks/package.json index ff3d20496e..a40515b3d6 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.9", "tailwindcss": "3.3.2", "typescript": "5.5.4" }, diff --git a/packages/notifications/package.json b/packages/notifications/package.json index 74374e5782..9e299783db 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.9", "typescript": "5.5.4" }, "peerDependencies": { diff --git a/packages/steer-sdk/package.json b/packages/steer-sdk/package.json index be9dea6228..8c605fc8e1 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.9", "viem": "2.21.4" }, "devDependencies": { diff --git a/packages/ui/package.json b/packages/ui/package.json index 2779c9e505..3e70be6556 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.9", "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..8b14eacd84 100644 --- a/packages/ui/src/components/currency/Icon.tsx +++ b/packages/ui/src/components/currency/Icon.tsx @@ -33,6 +33,7 @@ const ZetaLogo = 'zeta.svg' const CroLogo = 'cronos.svg' const BitcoinLogo = 'bitcoin.svg' const MntLogo = 'mntl.svg' +const ApeLogo = 'ape.svg' const LOGO: Record = { [ChainId.ETHEREUM]: EthereumLogo, @@ -86,6 +87,7 @@ const LOGO: Record = { [ChainId.BLAST]: EthereumLogo, [ChainId.ROOTSTOCK]: BitcoinLogo, [ChainId.MANTLE]: MntLogo, + [ChainId.APE]: ApeLogo, } // function djb2(str: string) { diff --git a/packages/ui/src/icons/network/circle/ApeCircle.tsx b/packages/ui/src/icons/network/circle/ApeCircle.tsx new file mode 100644 index 0000000000..40ae8202a0 --- /dev/null +++ b/packages/ui/src/icons/network/circle/ApeCircle.tsx @@ -0,0 +1,12 @@ +import * as React from 'react' + +import { ApeNaked } from '../naked/ApeNaked' + +import { IconComponent } from '../../../types' + +export const ApeCircle: IconComponent = (props) => ( + } + /> +) diff --git a/packages/ui/src/icons/network/circle/index.tsx b/packages/ui/src/icons/network/circle/index.tsx index d55ff2a997..d20492ba0b 100644 --- a/packages/ui/src/icons/network/circle/index.tsx +++ b/packages/ui/src/icons/network/circle/index.tsx @@ -1,6 +1,7 @@ import { ChainId } from 'sushi/chain' import { IconComponent } from '../../../types' +import { ApeCircle } from './ApeCircle' import { AptosCircle } from './AptosCircle' import { ArbitrumCircle } from './ArbitrumCircle' import { ArbitrumNovaCircle } from './ArbitrumNovaCircle' @@ -43,6 +44,7 @@ import { TronCircle } from './TronCircle' import { ZKSyncCircle } from './ZKSyncCircle' import { ZetaChainCircle } from './ZetaChainCircle' +export * from './ApeCircle' export * from './AptosCircle' export * from './ArbitrumCircle' export * from './ArbitrumNovaCircle' @@ -127,6 +129,7 @@ export const NETWORK_CIRCLE_ICON: Partial< [ChainId.ROOTSTOCK]: RootstockCircle, [ChainId.CRONOS]: CronosCircle, [ChainId.MANTLE]: MantleCircle, + [ChainId.APE]: ApeCircle, aptos: AptosCircle, tron: TronCircle, } diff --git a/packages/ui/src/icons/network/naked/ApeNaked.tsx b/packages/ui/src/icons/network/naked/ApeNaked.tsx new file mode 100644 index 0000000000..1d5dddf4a7 --- /dev/null +++ b/packages/ui/src/icons/network/naked/ApeNaked.tsx @@ -0,0 +1,19 @@ +import * as React from 'react' + +import { NakedNetworkIconComponent } from '../../../types' + +export const ApeNaked: NakedNetworkIconComponent = ({ circle, ...props }) => ( + + {circle} + + +) diff --git a/packages/ui/src/icons/network/naked/index.tsx b/packages/ui/src/icons/network/naked/index.tsx index 2495bcff19..7c6a70f4e4 100644 --- a/packages/ui/src/icons/network/naked/index.tsx +++ b/packages/ui/src/icons/network/naked/index.tsx @@ -1,6 +1,7 @@ import { ChainId } from 'sushi/chain' import { IconComponent } from '../../../types' +import { ApeNaked } from './ApeNaked' import { AptosNaked } from './AptosNaked' import { ArbitrumNaked } from './ArbitrumNaked' import { ArbitrumNovaNaked } from './ArbitrumNovaNaked' @@ -43,6 +44,7 @@ import { TronNaked } from './TronNaked' import { ZKSyncNaked } from './ZKSyncNaked' import { ZetaChainNaked } from './ZetaChainNaked' +export * from './ApeNaked' export * from './AptosNaked' export * from './ArbitrumNaked' export * from './ArbitrumNovaNaked' @@ -126,6 +128,7 @@ export const NETWORK_NAKED_ICON: Partial< [ChainId.ROOTSTOCK]: RootstockNaked, [ChainId.CRONOS]: CronosNaked, [ChainId.MANTLE]: MantleNaked, + [ChainId.APE]: ApeNaked, aptos: AptosNaked, tron: TronNaked, } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 801fd5de93..46a913778c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -108,8 +108,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.17(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.9 + version: 4.1.9(typescript@5.5.4)(viem@2.21.17(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 @@ -397,8 +397,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.9 + version: 4.1.9(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) @@ -585,8 +585,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(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.9 + version: 4.1.9(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(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) @@ -647,8 +647,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@6.0.3)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.9 + version: 4.1.9(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(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)) @@ -693,8 +693,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.17(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) + specifier: 4.1.9 + version: 4.1.9(typescript@5.5.4)(viem@2.21.17(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8) typescript: specifier: 5.5.4 version: 5.5.4 @@ -705,8 +705,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.9 + version: 4.1.9(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) viem: specifier: 2.21.4 version: 2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -949,8 +949,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.17(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.9 + version: 4.1.9(typescript@5.5.4)(viem@2.21.17(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)) @@ -14814,19 +14814,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.9: + resolution: {integrity: sha512-JJA5JD8U4FIu1FMX+6RLhH+jwsSxAHfA1+2BO+29mE2PchJg5wDthyJVtrK8YTi24Zzx/ip4Uxu8yjdD+8CNNQ==} peerDependencies: typescript: 5.5.4 viem: '*' @@ -35166,21 +35155,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - sushi@4.0.2(viem@2.21.17(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.17(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.17(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.9(typescript@5.5.4)(viem@2.21.17(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 @@ -35194,7 +35169,7 @@ snapshots: viem: 2.21.17(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.17(typescript@5.5.4)(zod@3.23.8))(zod@3.23.8): + sushi@4.1.9(typescript@5.5.4)(viem@2.21.17(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 @@ -35208,7 +35183,7 @@ snapshots: viem: 2.21.17(typescript@5.5.4)(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.9(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 @@ -35222,7 +35197,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(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(zod@3.23.8))(zod@3.23.8): + sushi@4.1.9(typescript@5.5.4)(viem@2.21.4(bufferutil@4.0.8)(typescript@5.5.4)(utf-8-validate@6.0.3)(zod@3.23.8))(zod@3.23.8): dependencies: '@uniswap/token-lists': 1.0.0-beta.33 big.js: 6.1.1