Aave Address Book

repository·main·Indexed 41 days ago

https://github.com/aave-dao/aave-address-book

A centralized registry of all Aave ecosystem smart contract addresses (version 4.68.2). It provides programmatic access to verified addresses and asset configurations via Solidity imports, JavaScript/TypeScript packages, and a JSON API for integration into development workflows across multiple networks including Ethereum, Polygon, Arbitrum, and Avalanche.

Tokens
22.4K
Snippets
45
Records
46
Agent score
48%

What's inside Aave Address Book

  1. Consume the Aave Address Book via JSON API

    main

    The address book is available as static JSON files for programmatic access. You can fetch the manifest.json to discover available modules and their paths, then fetch the specific module JSON file.

    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(),
    );
  2. Install the Aave Address Book

    main

    You can install the Aave Address Book registry for use in either Foundry (Solidity) or Node.js (JavaScript/TypeScript) environments.

    ### Foundry
    ```sh
    forge install aave-dao/aave-address-book

    Node.js

    npm install @aave-dao/aave-address-book
  3. Run the AAVE Address Book UI development server

    main

    To start the AAVE Address Book UI in development mode, run the development command using your preferred package manager. Once the server is running, you can view the application by navigating to http://localhost:3000 in your web browser.

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
    # or
    bun dev
  4. Development workflow: Generate, Build, and Test

    main

    For contributors or developers working on the address book itself:

    Generate addresses from on-chain registries:

    npm run generate:addresses

    Build the project:

    npm run build
    forge build

    Run tests:

    • Node.js tests (sanity checks for view functions): npm test
    • Foundry tests (verification suite): forge test
    npm run generate:addresses
    npm run build
    forge build
    npm test
    forge test
  5. Configure RPC and Explorer environment variables

    main

    To ensure reliable connections during development or testing, configure your .env file with the following keys. By default, the package uses public RPCs via viem, but you can override them using RPC_<NETWORK>.

    ETHERSCAN_API_KEY=your_key_here
    EXPLORER_PROXY=your_proxy
    
    ## RPC configuration
    # RPC_<NETWORK>=your_rpc_url
    ALCHEMY_API_KEY=your_key_here
    QUICKNODE_ENDPOINT_NAME=your_quicknode_endpoint_name
    QUICKNODE_TOKEN=your_quicknode_token
  6. Use Aave addresses in Solidity

    main

    Import specific network modules directly into your smart contracts to access verified Aave ecosystem addresses. Modules are organized by version and network (e.g., AaveV3Ethereum.sol).

    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;
        // ...
      }
    }
  7. Use Aave addresses in JavaScript/TypeScript

    main

    Import network modules from the @aave-dao/aave-address-book package to access addresses and chain IDs as constants.

    import { AaveV3Ethereum, AaveV2Avalanche } from "@aave-dao/aave-address-book";
    
    console.log(AaveV3Ethereum.POOL); // "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"
    console.log(AaveV3Ethereum.CHAIN_ID); // 1
  8. Reference the JSON API structure

    main

    The JSON API provides three main levels of data:

    • manifest.json: Describes the package version, source commit, aggregate, and available modules.
    • address-book.json: Contains every exported address-book module.
    • modules/<name>.json: Contains a single specific module (e.g., AaveV3Ethereum.json).

    URLs using /api/v1 represent the latest deployment from main. For immutable versioned access, use the format https://assets.aave.com/address-book/releases/v<version>/modules/<name>.json.

  9. Import Aave smart contract ABIs

    main

    The src/ts/abis/index.ts file serves as the central entry point for importing Application Binary Interface (ABI) definitions for various Aave smart contracts. You can import these ABIs to interact with Aave protocols using libraries like ethers.js or viem.

    Available ABIs include, but are not limited to:

    • Core Lending: ILendingPool_ABI, ILendingPoolAddressesProvider_ABI, ILendingPoolConfigurator_ABI
    • Governance: IVotingPortal_ABI, IVotingMachineWithProofs_ABI, IGovernancePowerStrategy_ABI
    • V4 Components: IHubV4_ABI, ISpokeV4_ABI, IAaveV4ConfigEngine_ABI, IAaveOracleV4_ABI
    • Tokens: IAToken_ABI, IAaveToken_ABI, IStkAaveToken_ABI, IUmbrellaStakeToken_ABI
    • Management: IACLManager_ABI, IRiskSteward_ABI, IUiPoolDataProvider_ABI
    import { ILendingPool_ABI, ILendingPoolAddressesProvider_ABI } from '@aave-dao/aave-address-book/src/ts/abis';
    
    // Example usage with ethers.js
    const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
    const addressesProvider = new ethers.Contract(ADDRESSES_PROVIDER_ADDR, ILendingPoolAddressesProvider_ABI, provider);
    const lendingPool = new ethers.Contract(LENDING_POOL_ADDR, ILendingPool_ABI, provider);
  10. Reference: Aave V3 Arbitrum Sepolia core addresses

    main

    The following constants are exported for use on the Arbitrum Sepolia network:

    • POOL_ADDRESSES_PROVIDER: IPoolAddressesProvider
    • POOL: IPool
    • POOL_CONFIGURATOR: IPoolConfigurator
    • ORACLE: IAaveOracle
    • ACL_ADMIN: ACL Admin address
    • ACL_MANAGER: IACLManager
    • AAVE_PROTOCOL_DATA_PROVIDER: IPoolDataProvider
    • POOL_IMPL: Pool implementation address
    • POOL_CONFIGURATOR_IMPL: PoolConfigurator implementation address
    • DEFAULT_INCENTIVES_CONTROLLER: Default incentives controller
    • EMISSION_MANAGER: Emission manager
    • COLLECTOR: ICollector
    • DEFAULT_A_TOKEN_IMPL: Default aToken implementation
    • DEFAULT_VARIABLE_DEBT_TOKEN_IMPL: Default variable debt token implementation
    • L2_ENCODER: L2 Encoder
    • CONFIG_ENGINE: Config engine
    • POOL_ADDRESSES_PROVIDER_REGISTRY: Pool Addresses Provider Registry
    • UI_INCENTIVE_DATA_PROVIDER: UI Incentive Data Provider
    • UI_POOL_DATA_PROVIDER: UI Pool Data Provider
    • WALLET_BALANCE_PROVIDER: Wallet balance provider
    • WETH_GATEWAY: WETH Gateway
    • CHAIN_ID: 421614
    export const POOL_ADDRESSES_PROVIDER = '0xB25a5D144626a0D488e52AE717A051a2E9997076';
    export const POOL = '0xBfC91D59fdAA134A4ED45f7B584cAf96D7792Eff';
    export const POOL_CONFIGURATOR = '0x8E4Bb46E6245a507F1a267ef488228B08c0dc664';
    export const ORACLE = '0xEf95A6B9e88Bd509Fd67BA741cf2b263DaC65c00';
    export const ACL_ADMIN = '0xC08C599C22bfD4a729E33e1Ed9b49456Abad0005';
    export const ACL_MANAGER = '0xB66f0fF09f256A73d2E2b5faF596b363A21a7D68';
    export const AAVE_PROTOCOL_DATA_PROVIDER = '0x12373B5085e3b42D42C1D4ABF3B3Cf4Df0E0Fa01';
    export const POOL_IMPL = '0x82405D1a189bd6cE4667809C35B37fBE136A4c5B';
    export const POOL_CONFIGURATOR_IMPL = '0x629A5a607aC4901252e4C48a0Fde156785598F5b';
    export const DEFAULT_INCENTIVES_CONTROLLER = '0x3A203B14CF8749a1e3b7314c6c49004B77Ee667A';
    export const EMISSION_MANAGER = '0x54E3aa872c3d2A89D1A6495F770f2cCa2C4Fc185';
    export const COLLECTOR = '0xa0208CE8356ad6C5EC6dFb8996c9A6B828212022';
    export const DEFAULT_A_TOKEN_IMPL = '0xc0Bac16A64FbAa7EE6483bD12a759e28cD13dcBe';
    export const DEFAULT_VARIABLE_DEBT_TOKEN_IMPL = '0x486C2D3F59E4d72f3cAa301a7eF19E3db657F5b0';
    export const L2_ENCODER = '0x2E45e7dCD1e94d8edf1605FfF4602912FDC662bC';
    export const CONFIG_ENGINE = '0x0a275C06556EeB3c7Ff2b0f0cfD462A7645772EF';
    export const POOL_ADDRESSES_PROVIDER_REGISTRY = '0xbB7492Cce831eE6F349960a6E2da8eadC4b50cA3';
    export const UI_INCENTIVE_DATA_PROVIDER = '0xB90fa850a4af6D30feA8b41989eaAecDcA8fd414';
    export const UI_POOL_DATA_PROVIDER = '0x97Cf44bF6a9A3D2B4F32b05C480dBEdC018F72A9';
    export const WALLET_BALANCE_PROVIDER = '0x1Be33D186a081eFDf15310e4bdEd81E828C47f9b';
    export const WETH_GATEWAY = '0x20040a64612555042335926d72B4E5F667a67fA1';
    export const CHAIN_ID = 421614;
  11. External Library Addresses for Aave V3 Avalanche

    main

    The EXTERNAL_LIBRARIES object maps specific logic types to their deployed contract addresses on Avalanche. Use these when you need to interact with specific logic implementations like Flashloans, Borrowing, or Liquidations.

    export const EXTERNAL_LIBRARIES = {
      FLASHLOAN_LOGIC: '0x6D414cd0d5eAf8C43200ac0c325A7E2Ad83B8be6',
      BORROW_LOGIC: '0x52Da0ce88202D1542543598D1e1e27F0d344726A',
      LIQUIDATION_LOGIC: '0x96D5686812e33Ab509ECCDb38C89d15607B2a413',
      POOL_LOGIC: '0xD70593841C57cbaA04957cc3EAcE95708e48853b',
      SUPPLY_LOGIC: '0x584C7d8c4cb05304FE5Ac7fbc97f20A10Fb07564',
    } as const;
  12. Aave V2 Ethereum AMM Core Contract Addresses

    main

    The following constants provide the core smart contract addresses for Aave V2 on the Ethereum mainnet. These are essential for interacting with the protocol's lending pools, configuration, and administrative components.

    export const POOL_ADDRESSES_PROVIDER = '0xAcc030EF66f9dFEAE9CbB0cd1B25654b82cFA8d5';
    export const POOL = '0x7937D4799803FbBe595ed57278Bc4cA21f3bFfCB';
    export const POOL_IMPL = '0xb9184a4480830bf89B55b73631E287Df9079F466';
    export const POOL_CONFIGURATOR = '0x23A875eDe3F1030138701683e42E9b16A7F87768';
    export const POOL_CONFIGURATOR_IMPL = '0x9f3Cc7b6f5F75d97735763c22cb280dbF90f17a2';
    export const ORACLE = '0xA50ba011c48153De246E5192C8f9258A2ba79Ca9';
    export const LENDING_RATE_ORACLE = '0x8A32f49FFbA88aba6EFF96F45D8BD1D4b3f35c7D';
    export const AAVE_PROTOCOL_DATA_PROVIDER = '0xc443AD9DDE3cecfB9dfC5736578f447aFE3590ba';
    export const LENDING_POOL_COLLATERAL_MANAGER = '0xa5ea4371b3A8B18a7713193Cd3b2d7C1761901a4';
    export const POOL_ADMIN = '0x5300A1a15135EA4dc7aD5a167152C01EFc9b192A';
    export const EMERGENCY_ADMIN = '0x2CFe3ec4d5a6811f4B8067F0DE7e47DfA938Aa30';
    export const COLLECTOR = '0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c';
    export const CONFIG_ENGINE = '0xcfC26009618ec2Ca8787180116a37Caa354a465C';
    export const MIGRATION_HELPER = '0x3cd1dFB81C50A5300C60a181ED145a7286d81e0a';
    export const POOL_ADDRESSES_PROVIDER_REGISTRY = '0x52D306e36E3B6B02c153d0266ff0f85d18BCD413';
    export const RATES_FACTORY = '0x6e4D068105052C3877116DCF86f5FF36B7eCa2B8';
    export const UI_INCENTIVE_DATA_PROVIDER = '0xD01ab9a6577E1D84F142e44D49380e23A340387d';
    export const UI_POOL_DATA_PROVIDER = '0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A';
    export const WALLET_BALANCE_PROVIDER = '0x8E8dAd5409E0263a51C0aB5055dA66Be28cFF922';
    export const WETH_GATEWAY = '0xbe9a7B3F2f54E18D7C0a17B03ad84Ac2D1D28eAC';
    export const CLINIC_STEWARD = '0xE1e62c3ee0c581F715fBb0e23CDA536Fc29eeB2c';