Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 3c8a38c

Browse files
authored
Merge pull request #49 from akanoce/chore-update-aave-deps
chore: align aave deps with latest, update wagmi and viem
2 parents f107626 + baba30e commit 3c8a38c

File tree

6 files changed

+958
-269
lines changed

6 files changed

+958
-269
lines changed

apps/next-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"pino-pretty": "^11.1.0",
2929
"react": "^18",
3030
"react-dom": "^18",
31-
"viem": "2.9.31",
32-
"wagmi": "^2.9.3",
31+
"viem": "^2.24.1",
32+
"wagmi": "^2.14.15",
3333
"zustand": "^4.5.2"
3434
},
3535
"devDependencies": {

apps/vite-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"react": "^18.3.1",
2626
"react-dom": "^18.3.1",
2727
"react-router-dom": "^6.23.0",
28-
"viem": "2.9.31",
29-
"wagmi": "^2.9.7",
28+
"viem": "^2.24.1",
29+
"wagmi": "^2.14.15",
3030
"zustand": "^4.5.2"
3131
},
3232
"devDependencies": {

packages/aave-v3-react/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525
"watch": "yarn build --watch"
2626
},
2727
"dependencies": {
28-
"@aave/contract-helpers": "^1.29.1",
29-
"@aave/math-utils": "^1.29.1",
30-
"@bgd-labs/aave-address-book": "^3.0.1",
28+
"@aave/contract-helpers": "^1.33.1",
29+
"@aave/math-utils": "^1.33.1",
30+
"@bgd-labs/aave-address-book": "^4.17.1",
3131
"@tanstack/react-query": "^5.28.14",
3232
"bignumber.js": "^9.1.2",
33-
"dayjs": "^1.11.10",
33+
"dayjs": "^1.11.13",
3434
"ethers": "5",
3535
"react": "^18.2.0",
3636
"react-dom": "^18.2.0",
3737
"reflect-metadata": "^0.2.2",
38-
"viem": "^2.9.31",
39-
"wagmi": "^2.9.3"
38+
"viem": "^2.24.1",
39+
"wagmi": "^2.14.15"
4040
},
4141
"devDependencies": {
4242
"@types/react": "^18.2.74",
@@ -50,7 +50,7 @@
5050
"eslint-plugin-react": "^7.34.1",
5151
"eslint-plugin-react-refresh": "^0.4.6",
5252
"prettier": "^3.2.5",
53-
"tsup": "^8.0.2",
53+
"tsup": "^8.4.0",
5454
"typescript": "^5.4.4"
5555
},
5656
"keywords": [

packages/aave-v3-react/src/hooks/useEthersProvider/useEthersProvider.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export function clientToProvider(client: Client<Transport, Chain>) {
1313
if (transport.type === "fallback")
1414
return new providers.FallbackProvider(
1515
(transport.transports as ReturnType<Transport>[]).map(
16-
({ value }) => new providers.JsonRpcProvider(value?.url, network),
17-
),
16+
({ value }) => new providers.JsonRpcProvider(value?.url, network)
17+
)
1818
);
1919
return new providers.JsonRpcProvider(transport.url, network);
2020
}
@@ -23,6 +23,5 @@ export function clientToProvider(client: Client<Transport, Chain>) {
2323
export function useEthersProvider({ chainId }: { chainId?: number } = {}) {
2424
const client = useClient<Config>({ chainId });
2525
if (!client) throw new Error("No client found");
26-
// @ts-expect-error
2726
return useMemo(() => clientToProvider(client), [client]);
2827
}

packages/aave-v3-react/src/utils/getAddressBookFromChainid.ts

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import {
66
AaveV3Avalanche,
77
AaveV3Base,
88
AaveV3BaseSepolia,
9-
AaveV3Fantom,
10-
AaveV3FantomTestnet,
9+
AaveV3Linea,
10+
AaveV3Mantle,
11+
AaveV3ZkSync,
1112
AaveV3Gnosis,
12-
AaveV3Harmony,
13-
AaveV3Fuji,
1413
AaveV3BNB,
1514
AaveV3Polygon,
16-
AaveV3PolygonZkEvm,
1715
AaveV3Optimism,
1816
AaveV3OptimismSepolia,
1917
AaveV3Scroll,
@@ -40,7 +38,11 @@ import {
4038
optimismSepolia,
4139
scrollSepolia,
4240
scroll,
41+
linea,
42+
mantle,
43+
zksync,
4344
} from "viem/chains";
45+
// TODO: Sonic not exported by viem
4446

4547
export const supportedNetworks = [
4648
sepolia,
@@ -63,6 +65,8 @@ export const supportedNetworks = [
6365
scroll,
6466
scrollSepolia,
6567
bsc,
68+
linea,
69+
mantle,
6670
];
6771

6872
export const getAddressBookFromChainid = (chainId: number) => {
@@ -83,22 +87,14 @@ export const getAddressBookFromChainid = (chainId: number) => {
8387
return AaveV3Base;
8488
case baseSepolia.id:
8589
return AaveV3BaseSepolia;
86-
case fantom.id:
87-
return AaveV3Fantom;
88-
case fantomTestnet.id:
89-
return AaveV3FantomTestnet;
9090
case gnosis.id:
9191
return AaveV3Gnosis;
92-
case harmonyOne.id:
93-
return AaveV3Harmony;
94-
case avalancheFuji.id:
95-
return AaveV3Fuji;
92+
// case avalancheFuji.id:
93+
// return AaveV3Fuji; // do not support UI_POOL_DATA_PROVIDER
9694
// case metis.id:
9795
// return AaveV3Metis; // do not support WETH_GATEWAY
9896
case polygon.id:
9997
return AaveV3Polygon;
100-
case polygonZkEvm.id:
101-
return AaveV3PolygonZkEvm;
10298
case optimism.id:
10399
return AaveV3Optimism;
104100
case optimismSepolia.id:
@@ -107,6 +103,17 @@ export const getAddressBookFromChainid = (chainId: number) => {
107103
return AaveV3Scroll;
108104
case scrollSepolia.id:
109105
return AaveV3ScrollSepolia;
106+
// case sonic.id:
107+
// return AaveV3Sonic;
108+
// TODO: Add sonic
109+
case linea.id:
110+
return AaveV3Linea;
111+
case mantle.id:
112+
return AaveV3Mantle;
113+
// case celo.id:
114+
// return AaveV3Celo; // do not support WETH_GATEWAY
115+
case zksync.id:
116+
return AaveV3ZkSync;
110117
default:
111118
throw new Error("Chain not supported");
112119
}

0 commit comments

Comments
 (0)