From 0c511fb4adf45fc20833cc1d8b1c4a9689b13b9d Mon Sep 17 00:00:00 2001 From: JustJousting Date: Wed, 4 Jun 2025 17:12:00 +0300 Subject: [PATCH 1/6] chore: bump curve-js to 2.67.0 --- apps/main/package.json | 2 +- yarn.lock | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/apps/main/package.json b/apps/main/package.json index 65b02e4e6e..28211bbac9 100644 --- a/apps/main/package.json +++ b/apps/main/package.json @@ -18,7 +18,7 @@ "analyze": "ANALYZE=true next build" }, "dependencies": { - "@curvefi/api": "2.66.30", + "@curvefi/api": "2.67.0", "@curvefi/llamalend-api": "^1.0.21", "@ethersproject/abi": "^5.8.0", "@hookform/error-message": "^2.0.1", diff --git a/yarn.lock b/yarn.lock index 1d900287e7..b749303a78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1709,19 +1709,19 @@ __metadata: languageName: node linkType: hard -"@curvefi/api@npm:2.66.30": - version: 2.66.30 - resolution: "@curvefi/api@npm:2.66.30" +"@curvefi/api@npm:2.67.0": + version: 2.67.0 + resolution: "@curvefi/api@npm:2.67.0" dependencies: - "@curvefi/ethcall": "npm:^6.0.13" + "@curvefi/ethcall": "npm:^6.0.14" bignumber.js: "npm:^9.3.0" ethers: "npm:^6.14.1" memoizee: "npm:^0.4.17" - checksum: 10c0/bad98fb876986308b2505d13d7658352e8333628fb9de502f609f3cf41565ca5a9813a62d4eeb164fa0cf4a55f1f9d7551864da3f2bb87599ea9d22f801bc8ab + checksum: 10c0/1f40108aedd1c0d6e9bf1f8352b9418a3d0b86fa331936694934986ab649fad69b159bc2a0ea14c7bf79596e2607190d8a6f89a0b158485b9d67f0743296d66f languageName: node linkType: hard -"@curvefi/ethcall@npm:6.0.13, @curvefi/ethcall@npm:^6.0.13": +"@curvefi/ethcall@npm:6.0.13": version: 6.0.13 resolution: "@curvefi/ethcall@npm:6.0.13" dependencies: @@ -1733,6 +1733,18 @@ __metadata: languageName: node linkType: hard +"@curvefi/ethcall@npm:^6.0.14": + version: 6.0.14 + resolution: "@curvefi/ethcall@npm:6.0.14" + dependencies: + "@types/node": "npm:^22.12.0" + abi-coder: "npm:^5.0.0" + peerDependencies: + ethers: ^6.0.0 + checksum: 10c0/a29ca908e4c2c769607374d73c1d926f1b17696901e82352d5834cfcbaa8b5d5a6df4c7925996fd0decba3324bc0fce348d4bf56dec688215f9d67b8aafdf898 + languageName: node + linkType: hard + "@curvefi/llamalend-api@npm:^1.0.21": version: 1.0.21 resolution: "@curvefi/llamalend-api@npm:1.0.21" @@ -14987,7 +14999,7 @@ __metadata: version: 0.0.0-use.local resolution: "main@workspace:apps/main" dependencies: - "@curvefi/api": "npm:2.66.30" + "@curvefi/api": "npm:2.67.0" "@curvefi/llamalend-api": "npm:^1.0.21" "@ethersproject/abi": "npm:^5.8.0" "@hookform/error-message": "npm:^2.0.1" From fca5e64742e488f058081565b65b527fd4a8ee94 Mon Sep 17 00:00:00 2001 From: JustJousting Date: Wed, 4 Jun 2025 17:26:19 +0300 Subject: [PATCH 2/6] chore: add hyperliquid to prices-api, bump version to 1.1.7 --- packages/prices-api/package.json | 2 +- packages/prices-api/src/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/prices-api/package.json b/packages/prices-api/package.json index fe5e02c6a9..259a23a753 100644 --- a/packages/prices-api/package.json +++ b/packages/prices-api/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/prices-api", - "version": "1.1.6", + "version": "1.1.7", "license": "MIT", "type": "module", "scripts": { diff --git a/packages/prices-api/src/index.ts b/packages/prices-api/src/index.ts index b36867d2f5..1a65e599eb 100644 --- a/packages/prices-api/src/index.ts +++ b/packages/prices-api/src/index.ts @@ -39,6 +39,7 @@ export const chains = [ 'polygon', 'fraxtal', 'sonic', + 'hyperliquid', ] as const export type Chain = (typeof chains)[number] From e4f2cd262ddd73d62a06d6a3798f831ccef663a8 Mon Sep 17 00:00:00 2001 From: JustJousting Date: Wed, 4 Jun 2025 17:27:18 +0300 Subject: [PATCH 3/6] chore: add hyperliquid to full networks --- packages/curve-ui-kit/src/utils/network.ts | 1 + packages/ui/src/utils/utilsNetworks.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/packages/curve-ui-kit/src/utils/network.ts b/packages/curve-ui-kit/src/utils/network.ts index 4510607c3b..53fbddbbdb 100644 --- a/packages/curve-ui-kit/src/utils/network.ts +++ b/packages/curve-ui-kit/src/utils/network.ts @@ -21,6 +21,7 @@ export enum Chain { XLayer = 196, Mantle = 5000, Sonic = 146, + Hyperliquid = 999, } /** diff --git a/packages/ui/src/utils/utilsNetworks.ts b/packages/ui/src/utils/utilsNetworks.ts index 5114b5d945..1b278f06ff 100644 --- a/packages/ui/src/utils/utilsNetworks.ts +++ b/packages/ui/src/utils/utilsNetworks.ts @@ -170,6 +170,13 @@ export const NETWORK_BASE_CONFIG = { nativeCurrencySymbol: 'S', explorerUrl: 'https://sonicscan.org/', }, + [Chain.Hyperliquid]: { + id: 'hyperliquid', + chainId: Chain.Hyperliquid, + rpcUrl: `https://rpc.hyperliquid.xyz/evm`, + nativeCurrencySymbol: 'HYPE', + explorerUrl: 'https://www.hyperscan.com/', + }, } satisfies { [key in Chain]: { chainId: key; [_: string]: any } } export type BaseConfig = { From 7306979e283adb7c6669e869bd75adc4c6a6ef99 Mon Sep 17 00:00:00 2001 From: JustJousting Date: Wed, 4 Jun 2025 17:39:09 +0300 Subject: [PATCH 4/6] chore: include hyperliquid in upgraded networks --- apps/main/src/dex/lib/networks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/main/src/dex/lib/networks.ts b/apps/main/src/dex/lib/networks.ts index e4865c2515..45afc16837 100644 --- a/apps/main/src/dex/lib/networks.ts +++ b/apps/main/src/dex/lib/networks.ts @@ -343,7 +343,7 @@ export async function getNetworks() { const liteNetworks = Object.values(resp).reduce( (prev, { chainId, ...config }) => { - const isUpgraded = chainId == Chain.Sonic // sonic is upgraded from lite to full + const isUpgraded = chainId == Chain.Sonic || chainId == Chain.Hyperliquid // sonic and hyperliquid are upgraded from lite to full prev[chainId] = { ...getBaseNetworksConfig(Number(chainId), config), ...DEFAULT_NETWORK_CONFIG, From 71ac2e67a9242c9856bba9571fc0a987b10bc155 Mon Sep 17 00:00:00 2001 From: JustJousting Date: Wed, 4 Jun 2025 17:43:14 +0300 Subject: [PATCH 5/6] chore: update block explorer for hyperliquid to Hyperscan in wagmi lib --- .../src/features/connect-wallet/lib/wagmi/custom-chains.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/curve-ui-kit/src/features/connect-wallet/lib/wagmi/custom-chains.ts b/packages/curve-ui-kit/src/features/connect-wallet/lib/wagmi/custom-chains.ts index bfa08f5169..ffeae56b53 100644 --- a/packages/curve-ui-kit/src/features/connect-wallet/lib/wagmi/custom-chains.ts +++ b/packages/curve-ui-kit/src/features/connect-wallet/lib/wagmi/custom-chains.ts @@ -25,7 +25,7 @@ export const hyperliquid = defineChain({ testnet: false, nativeCurrency: { name: 'Hype', symbol: 'HYPE', decimals: 18 }, rpcUrls: { default: { http: ['https://rpc.hyperliquid.xyz/evm'] } }, - blockExplorers: { default: { name: 'Purrsec', url: 'https://purrsec.com/' } }, + blockExplorers: { default: { name: 'Hyperscan', url: 'https://www.hyperscan.com/' } }, }) export const tac = defineChain({ From 1d792b353e5297c8be4ce311919b3ae105f24b96 Mon Sep 17 00:00:00 2001 From: JustJousting Date: Wed, 4 Jun 2025 19:49:12 +0300 Subject: [PATCH 6/6] refactor: update isUpgraded syntax --- apps/main/src/dex/lib/networks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/main/src/dex/lib/networks.ts b/apps/main/src/dex/lib/networks.ts index 45afc16837..5628baba15 100644 --- a/apps/main/src/dex/lib/networks.ts +++ b/apps/main/src/dex/lib/networks.ts @@ -343,7 +343,7 @@ export async function getNetworks() { const liteNetworks = Object.values(resp).reduce( (prev, { chainId, ...config }) => { - const isUpgraded = chainId == Chain.Sonic || chainId == Chain.Hyperliquid // sonic and hyperliquid are upgraded from lite to full + const isUpgraded = [Chain.Sonic, Chain.Hyperliquid].includes(chainId) // networks upgraded from lite to full prev[chainId] = { ...getBaseNetworksConfig(Number(chainId), config), ...DEFAULT_NETWORK_CONFIG,