@bgd-labs/aave-address-book 4.44.2-9714560ec245445f6cf53004f96fcc251d7a74b5.0 → 4.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +65 -79
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright
|
|
1
|
+
Copyright 2026 BGD Labs
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
|
@@ -1,133 +1,119 @@
|
|
|
1
1
|
<p align="center"><img width="200" src="./addressbook_logo.png" alt="Address book logo"></a></p>
|
|
2
2
|
|
|
3
|
-
# Aave Address Book
|
|
3
|
+
# Aave Address Book
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@bgd-labs/aave-address-book)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
An up-to-date registry of all Aave ecosystem smart contract addresses for use in Solidity and JavaScript/TypeScript projects.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
🔍 **[Search addresses online](https://search.onaave.com/)**
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Installation
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Foundry
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
forge install bgd-labs/aave-address-book
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### Node.js
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
|
|
23
|
-
import {AaveV3Avalanche} from "aave-address-book/AaveV3Avalanche.sol";
|
|
22
|
+
npm install @bgd-labs/aave-address-book
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
## Usage
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
import {AaveGovernanceV2} from "aave-address-book/AaveGovernanceV2.sol";
|
|
30
|
-
import {IGovernanceCore} from "aave-address-book/GovernanceV3.sol";
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**Import miscellaneous network addresses and interfaces relevant to the aave protocol:**
|
|
35
|
-
|
|
36
|
-
```sh
|
|
37
|
-
import {Misc<Network>} from "aave-address-book/Aave<Network>.sol";
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Production Recommendations
|
|
41
|
-
|
|
42
|
-
While there is a index import available in "aave-address-book/AaveAddressBook.sol", we only recommend using it in tests.
|
|
43
|
-
Foundry currently does not eliminate unused code for [verification](https://github.com/foundry-rs/foundry/issues/2266).
|
|
44
|
-
This results in rather gigantic verifications when using the index file import from [aave-address-book/AaveAddressBook.sol](./src/AaveAddressBook.sol).
|
|
45
|
-
For production code we therefore recommend to use pool specific libraries (`Aave[Version][Network][?SubPool]`) exported from `aave-address-book` like `AaveV2Ethereum` for the `V2` `Ethereum` pool.
|
|
27
|
+
### Solidity
|
|
46
28
|
|
|
47
|
-
|
|
29
|
+
```solidity
|
|
30
|
+
import { AaveV3Ethereum } from "aave-address-book/AaveV3Ethereum.sol";
|
|
31
|
+
import { AaveV2Avalanche } from "aave-address-book/AaveV2Avalanche.sol";
|
|
32
|
+
import { AaveGovernanceV2 } from "aave-address-book/AaveGovernanceV2.sol";
|
|
48
33
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
34
|
+
contract Example {
|
|
35
|
+
function execute() external {
|
|
36
|
+
address pool = AaveV3Ethereum.POOL;
|
|
37
|
+
// ...
|
|
38
|
+
}
|
|
39
|
+
}
|
|
53
40
|
```
|
|
54
41
|
|
|
55
|
-
###
|
|
56
|
-
|
|
57
|
-
```js
|
|
58
|
-
import * as pools from "@bgd-labs/aave-address-book"; // wildcard import
|
|
59
|
-
import { AaveV2Avalanche } from "@bgd-labs/aave-address-book"; // import specific pool
|
|
42
|
+
### JavaScript/TypeScript
|
|
60
43
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb"
|
|
44
|
+
```typescript
|
|
45
|
+
import { AaveV3Ethereum, AaveV2Avalanche } from "@bgd-labs/aave-address-book";
|
|
64
46
|
|
|
65
|
-
//
|
|
66
|
-
console.log(
|
|
67
|
-
// 43114
|
|
47
|
+
console.log(AaveV3Ethereum.POOL); // "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"
|
|
48
|
+
console.log(AaveV3Ethereum.CHAIN_ID); // 1
|
|
68
49
|
```
|
|
69
50
|
|
|
70
|
-
##
|
|
51
|
+
## Development
|
|
71
52
|
|
|
72
|
-
### Generate
|
|
53
|
+
### Generate addresses
|
|
73
54
|
|
|
74
|
-
The library
|
|
75
|
-
|
|
76
|
-
### Dependencies
|
|
55
|
+
The library uses a collection of [scripts](./scripts) to fetch addresses from various on-chain registries.
|
|
77
56
|
|
|
78
57
|
```sh
|
|
79
|
-
|
|
58
|
+
npm run generate:addresses
|
|
80
59
|
```
|
|
81
60
|
|
|
82
|
-
###
|
|
61
|
+
### Build
|
|
83
62
|
|
|
84
63
|
```sh
|
|
64
|
+
npm run build
|
|
85
65
|
forge build
|
|
86
66
|
```
|
|
87
67
|
|
|
88
|
-
###
|
|
68
|
+
### Test
|
|
69
|
+
|
|
70
|
+
The library includes a suite of tests that can be run using the following commands:
|
|
89
71
|
|
|
90
72
|
```sh
|
|
73
|
+
npm test
|
|
91
74
|
forge test
|
|
92
75
|
```
|
|
93
76
|
|
|
94
|
-
|
|
77
|
+
The node [test suite](./tests/sanity) is a collection of `sanity` tests, that ensure that view functions return the expected values (e.g. the correct pool is being configured in a given factory).
|
|
78
|
+
In addition to that there is a [verification suite](./tests/verification.spec.ts) that ensures that all the addresses listed on address book, are verified on our preferred explorers.
|
|
95
79
|
|
|
96
|
-
|
|
80
|
+
### Adding a new pool
|
|
97
81
|
|
|
98
|
-
|
|
82
|
+
1. Add pool configuration in `scripts/configs/<type>/<network>`
|
|
83
|
+
2. Run `npm run generate:addresses`
|
|
84
|
+
3. Commit the generated files
|
|
99
85
|
|
|
100
|
-
|
|
86
|
+
## Configuration
|
|
101
87
|
|
|
102
|
-
|
|
88
|
+
Create a `.env` file for reliable RPC connections:
|
|
103
89
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
90
|
+
```sh
|
|
91
|
+
ETHERSCAN_API_KEY=your_key_here
|
|
92
|
+
EXPLORER_PROXY=your_proxy
|
|
93
|
+
|
|
94
|
+
## RPC configuration
|
|
95
|
+
# Per default the package uses the public rpcs available via viem
|
|
96
|
+
# You can opt in to use private/different rpcs by setting the following environment variables
|
|
97
|
+
RPC_<NETWORK>=your_rpc_url
|
|
98
|
+
ALCHEMY_API_KEY=your_key_here
|
|
99
|
+
QUICKNODE_ENDPOINT_NAME=your_quicknode_endpoint_name
|
|
100
|
+
QUICKNODE_TOKEN=your_quicknode_token
|
|
101
|
+
```
|
|
109
102
|
|
|
110
|
-
|
|
103
|
+
## UI
|
|
111
104
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- Contract addresses of whitelabel instances which are not directly controlled by the Aave DAO are also included in this repository. A complete list of Whitelabel instances controlled by their respective teams can be found here: [AaveV3InkWhitelabel](src/AaveV3InkWhitelabel.sol)
|
|
105
|
+
The interactive UI can be found in [ui](./ui) package. The UI is a React application that is compiled as static build, so it can be hosted on github pages.
|
|
106
|
+
You can fine an instance of the UI at [search.onaave.com](https://search.onaave.com/)
|
|
115
107
|
|
|
116
|
-
|
|
108
|
+
## Resources
|
|
117
109
|
|
|
118
|
-
|
|
110
|
+
- **[Raycast Extension](https://www.raycast.com/smbdy/aave-search)** - Quick address lookup
|
|
111
|
+
- **[Web Search](https://search.onaave.com/)** - Browse all addresses
|
|
119
112
|
|
|
120
|
-
|
|
121
|
-
For some networks they are not very reliable though, therefore you can set `RPC_<NETWORK>` in your .env to use a private rpc.
|
|
122
|
-
Check https://github.com/bgd-labs/aave-address-book/blob/main/scripts/clients.ts#L39 for the chain naming convention.
|
|
123
|
-
Alternatively you can provide an `ALCHEMY_API_KEY` which will use alchemy as a fallback if no exact RPC is specified.
|
|
113
|
+
## License
|
|
124
114
|
|
|
125
|
-
|
|
115
|
+
MIT
|
|
126
116
|
|
|
127
|
-
|
|
128
|
-
1. Make sure you have Raycast installed on your Mac
|
|
129
|
-
2. Open Raycast, type `Store` and select the Store command
|
|
130
|
-
4. Search for `Aave Search` or navigate directly to the [extension page](https://www.raycast.com/smbdy/aave-search).
|
|
131
|
-
5. Click the Install button or press `⌘ + ↵` to install the extension
|
|
117
|
+
---
|
|
132
118
|
|
|
133
|
-
|
|
119
|
+
Maintained by [BGD Labs](https://bgdlabs.com/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bgd-labs/aave-address-book",
|
|
3
|
-
"version": "4.44.2
|
|
3
|
+
"version": "4.44.2",
|
|
4
4
|
"description": "This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|