Skip to content

Commit 2f1e1da

Browse files
authored
Merge pull request #4 from aave/feat/supply-example
Feat/supply example
2 parents c851518 + 7ac66b3 commit 2f1e1da

File tree

17 files changed

+3574
-49
lines changed

17 files changed

+3574
-49
lines changed

biome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@
108108
"rules": {
109109
"style": {
110110
"noNonNullAssertion": "off"
111-
}
111+
},
112+
"a11y": {
113+
"noLabelWithoutControl": "off"
114+
}
112115
}
113116
}
114117
}

examples/market/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
},
1010
"dependencies": {
1111
"@aave/react": "workspace:*",
12-
"@aave/types": "workspace:*",
13-
"@aave/env": "workspace:*",
14-
"@aave/client": "workspace:*",
1512
"react": "^19.1.0",
1613
"react-dom": "^19.1.0"
1714
},

examples/market/src/App.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import {
2-
AaveProvider,
3-
type Market,
4-
type Reserve,
5-
useAaveMarkets,
6-
} from '@aave/react';
7-
import { chainId } from '@aave/types';
1+
import { AaveProvider, chainId, useAaveMarkets } from '@aave/react';
82
import { client } from './client';
93

104
function MarketDisplay() {

examples/market/src/client.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { AaveClient } from '@aave/client';
2-
import { local } from '@aave/env';
1+
import { AaveClient, staging } from '@aave/react';
32

43
export const client = AaveClient.create({
5-
environment: local,
4+
environment: staging,
65
});

examples/market/src/config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { createConfig, http } from 'wagmi';
2+
import { mainnet, sepolia } from 'wagmi/chains';
3+
4+
export const config = createConfig({
5+
chains: [mainnet, sepolia],
6+
transports: {
7+
[mainnet.id]: http(),
8+
[sepolia.id]: http(),
9+
},
10+
});

examples/supply/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Aave supply example
2+
3+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/aave/aave-sdk/tree/main/examples/supply)

examples/supply/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/lens.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css">
8+
<title>Aave supply example</title>
9+
</head>
10+
<body>
11+
<main id="root"></main>
12+
<script type="module" src="/src/main.tsx"></script>
13+
</body>
14+
</html>

examples/supply/package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "supply",
3+
"description": "Aave supply example",
4+
"private": true,
5+
"version": "0.0.0",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "vite"
9+
},
10+
"dependencies": {
11+
"@aave/react": "workspace:*",
12+
"@tanstack/react-query": "^5.83.0",
13+
"react": "^19.1.0",
14+
"react-dom": "^19.1.0",
15+
"viem": "^2.31.6",
16+
"wagmi": "^2.15.6"
17+
},
18+
"devDependencies": {
19+
"@types/react": "^19.1.8",
20+
"@types/react-dom": "^19.1.6",
21+
"@vitejs/plugin-react-swc": "^3.7.2",
22+
"typescript": "^5.6.3",
23+
"vite": "^5.4.9"
24+
}
25+
}

examples/supply/public/aave.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)