@aave-dao/aave-address-book

中文文档
4.77.0发布于 2026/11/09MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 16万

This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.

原始使用文档
文档目录17 节
  1. Installation
  2. Foundry
  3. Node.js
  4. Usage
  5. Solidity
  6. JavaScript/TypeScript
  7. JSON API
  8. Development
  9. Generate addresses
  10. Build
  11. Test
  12. Adding a new pool
  13. Configuration
  14. UI
  15. Address book API
  16. Resources
  17. License

Address book logo

Aave Address Book

npm version

An up-to-date registry of all Aave ecosystem smart contract addresses for use in Solidity and JavaScript/TypeScript projects or usage via JSON API.

🔍 Search addresses online

Installation

Foundry

forge install aave-dao/aave-address-book

Node.js

npm install @aave-dao/aave-address-book

Usage

Solidity

import { AaveV3Ethereum } from "aave-address-book/AaveV3Ethereum.sol";
import { AaveV2Avalanche } from "aave-address-book/AaveV2Avalanche.sol";
import { AaveGovernanceV2 } from "aave-address-book/AaveGovernanceV2.sol";

contract Example {
  function execute() external {
    address pool = AaveV3Ethereum.POOL;
    // ...
  }
}

JavaScript/TypeScript

import { AaveV3Ethereum, AaveV2Avalanche } from "@aave-dao/aave-address-book";

console.log(AaveV3Ethereum.POOL); // "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"
console.log(AaveV3Ethereum.CHAIN_ID); // 1

JSON API

The latest address book is also published as static JSON alongside the search UI:

Manifest paths are relative to the manifest URL and module names are case-sensitive:

const manifestUrl =
  "https://aave-dao.github.io/aave-address-book/api/v1/manifest.json";
const manifest = await fetch(manifestUrl).then((response) => response.json());
const ethereum = manifest.modules.find(
  (module: { name: string }) => module.name === "AaveV3Ethereum",
);
const addresses = await fetch(new URL(ethereum.path, manifestUrl)).then(
  (response) => response.json(),
);

The /api/v1 URLs always represent the latest deployment from main. Use the manifest's commit and SHA-256 fields to identify and verify the exact content. A future breaking change to the JSON structure or paths will use a new API version.

Development

Generate addresses

The library uses a collection of scripts to fetch addresses from various on-chain registries.

npm run generate:addresses

Build

npm run build
forge build

Test

The library includes a suite of tests that can be run using the following commands:

npm test
forge test

The node test suite 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). In addition to that there is a verification suite that ensures that all the addresses listed on address book, are verified on our preferred explorers.

Adding a new pool

  1. Add pool configuration in scripts/configs/<type>/<network>
  2. Run npm run generate:addresses
  3. Commit the generated files

Configuration

Create a .env file for reliable RPC connections:

ETHERSCAN_API_KEY=your_key_here
EXPLORER_PROXY=your_proxy

## RPC configuration
# Per default the package uses the public rpcs available via viem
# You can opt in to use private/different rpcs by setting the following environment variables
RPC_<NETWORK>=your_rpc_url
ALCHEMY_API_KEY=your_key_here
QUICKNODE_ENDPOINT_NAME=your_quicknode_endpoint_name
QUICKNODE_TOKEN=your_quicknode_token

UI

The interactive UI can be found in ui package. The UI is a React application that is compiled as static build, so it can be hosted on github pages. You can fine an instance of the UI at search.onaave.com

Address book API

Each release is published as a static JSON document for programmatic consumption:

https://assets.aave.com/address-book/releases/latest/manifest.json
https://assets.aave.com/address-book/releases/latest/address-book.json
https://assets.aave.com/address-book/releases/latest/modules/AaveV3Ethereum.json
https://assets.aave.com/address-book/releases/v<version>/modules/AaveV3Ethereum.json

The API contains an aggregate address book, one file per package module, and a manifest containing the package version, commit, byte sizes, and SHA-256 hashes. The latest files have a short cache lifetime, while versioned files are immutable. The deployment bucket is configured through the STATICS_BUCKET GitHub Actions secret.

Resources

License

MIT


Maintained by Aave Labs

版本与发布记录

@aave-dao/aave-address-book 共发布 588 个版本,首次发布于 2026/02/19;过去 12 个月发布了 588 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.77.0latest2026/11/09今天
4.77.1-aeff683e0715ccdccc52f43665f4ca73a09f0cb8.0beta2026/11/09今天
4.76.3-d1458fc110604d6c9d3e69a1a963cdecd477402d.02026/11/09今天
4.77.1-5eec2b48376c86b2ccbdf785e353949de225f006.02026/11/09今天
4.76.3-c7594d741cf9b80d76f5b333e2783f5fde30670c.02026/11/09今天
4.76.22026/11/081 天前

关于 @aave-dao/aave-address-book 的常见问题

@aave-dao/aave-address-book 是什么?

This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.

如何安装 @aave-dao/aave-address-book?

在项目目录运行 npm install @aave-dao/aave-address-book,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:viem(^2.23.5)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aave-dao/aave-address-book 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aave-dao/aave-address-book 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@aave-dao/aave-address-book 可以商用吗?

@aave-dao/aave-address-book 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aave-dao/aave-address-book 的下载量有多少?

根据 npm 官方下载统计,@aave-dao/aave-address-book 在 2026/10/05 – 2026/11/03 这 30 天内被下载 160,445 次,日均约 5,348 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aave-dao/aave-address-book 还在维护吗?

最新版本 4.77.0 发布于 2026/11/09(今天);至今共发布 588 个版本,其中过去 12 个月发布了 588 个;首次发布于 2026/02/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。