Skip to content

Usage with foundry instructions don't work #897

Open
@svenski123

Description

@svenski123

Installing the aave address book in a newly initialised forge project and importing an aave interface as set out in the README.md fails due to missing files or bad remappings.

Following steps in README.md...

Usage with foundry

With Foundry installed and being in a Git repository:

forge install bgd-labs/aave-address-book
Import a pool specific collection of addresses & interfaces:

import {AaveV2Ethereum} from "aave-address-book/AaveV2Ethereum.sol";

results in this...

$ forge init --commit aave
$ cd aave
$ forge install --commit bgd-labs/aave-address-book
$ sed -i~ '3aimport {AaveV2Ethereum} from "aave-address-book/AaveV2Ethereum.sol";\n' src/Counter.sol
$ git diff
diff --git a/src/Counter.sol b/src/Counter.sol
index aded799..56e9166 100644
--- a/src/Counter.sol
+++ b/src/Counter.sol
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: UNLICENSED
 pragma solidity ^0.8.13;

+import {AaveV2Ethereum} from "aave-address-book/AaveV2Ethereum.sol";
+
 contract Counter {
     uint256 public number;

$ forge build 2>&1 | sed "s#${HOME}/box#~#g"
2025-03-27T14:11:54.235683Z ERROR foundry_compilers_artifacts_solc::sources: error="~/aave/lib/aave-address-book/lib/aave-v3-origin/contracts/protocol/libraries/types/DataTypes.sol": No such file or directory (os error 2)
Error: failed to resolve file: "~/aave/lib/aave-address-book/lib/aave-v3-origin/contracts/protocol/libraries/types/DataTypes.sol": No such file or directory (os error 2); check configured remappings
        --> ~/aave/lib/aave-address-book/src/AaveV3.sol
        aave-v3-origin/contracts/protocol/libraries/types/DataTypes.sol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions