Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(soldeer): Error: data did not match any variant of untagged enum when adding Aave V3 Core dependency #10087

Open
Progamermaker101 opened this issue Mar 15, 2025 · 3 comments
Assignees
Labels
A-dependencies Area: dependencies Cmd-forge-pm Command: forge install/update/remove

Comments

@Progamermaker101
Copy link

I’m unable to add the Aave V3 Core dependency to my Foundry project. Other libraries (like OpenZeppelin) work fine, but Aave V3 triggers a “data did not match any variant of untagged enum” error. I’ve tried multiple tags, removing BOM, reinstalling Foundry, etc., but the error persists.

Environment
OS: Ubuntu 24.04.2 LTS (via WSL or native Linux)

Output of lsb_release -a:

Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04

Foundry Version:
forge --version
Forge Version: 1.0.0-stable

foundry.toml Configuration
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
[dependencies]
aave-v3-core = { git = "https://github.com/aave/aave-v3-core.git", tag = "v1.19.4" }

Exact Steps Taken & What We've Tried
Initializing the Project
Ran forge init foundry-flashloan to create a new project.
Manually added the Aave V3 dependency to foundry.toml.
Verified other dependencies (e.g., OpenZeppelin) work fine.

Running forge build
Got:
Error: failed to extract foundry config;
foundry config error: data did not match any variant of untagged enum SoldeerDependencyValue
for setting 'dependencies.aave-v3-core'

Trying Different Aave V3 Versions
Attempted multiple tags, including:

tag = "v1.19.4"
tag = "v1.14.2"
branch = "master"
rev = "v1.14.2"

Also tried reinstalling Foundry & Cleaning the Environment
Tried:

bash
foundryup uninstall
rm -rf ~/.foundry ~/.config/foundry
foundryup
Then reinitialized the project with:

bash
forge init foundry-flashloan
forge install aave/[email protected]

Checking for Hidden Formatting Issues in foundry.toml
Checked for BOM (Byte Order Mark) Issues

Used xxd foundry.toml → No ef bb bf detected.
Used dos2unix foundry.toml → No change in error.
Recreated foundry.toml from Scratch

bash
rm foundry.toml
echo -e "[profile.default]\nsrc = "src"\nout = "out"\nlibs = ["lib"]\n\n[dependencies]\naave-v3-core = { git = "https://github.com/aave/aave-v3-core.git\", tag = "v1.19.4" }" > foundry.toml
Still fails on forge build.

Testing Other Dependencies
✅ OpenZeppelin Works: Installed OpenZeppelin using:

bash
forge install OpenZeppelin/openzeppelin-contracts
forge build worked fine.

❌ Aave V3 Core Fails:
Only Aave V3 Core produces this "data did not match any variant of untagged enum" error.

Expected: forge build should either successfully compile or at least process dependencies without error.
Actual: forge build fails with the SoldeerDependencyValue error, specifically for Aave V3 Core.

Image

Image

Image

Image

Image

@github-project-automation github-project-automation bot moved this to Todo in Foundry Mar 15, 2025
@zerosnacks zerosnacks added the A-dependencies Area: dependencies label Mar 17, 2025
@zerosnacks
Copy link
Member

cc @mario-eth this appears to be related to Soldeer

@zerosnacks zerosnacks changed the title Error: data did not match any variant of untagged enum when adding Aave V3 Core dependency bug(soldeer): Error: data did not match any variant of untagged enum when adding Aave V3 Core dependency Mar 17, 2025
@zerosnacks zerosnacks added the Cmd-forge-pm Command: forge install/update/remove label Mar 17, 2025
@mario-eth
Copy link
Contributor

mario-eth commented Mar 17, 2025

Hey i you missing the version field, even if you have the tag you still need the version = "v1.19.4"

aave-v3-core = { version = "v1.19.4", git = "https://github.com/aave/aave-v3-core.git", tag = "v1.19.4" }

alternatively you can use this command and it will automatically install it for you

forge soldeer install aave-v3-core~v1.19.4 https://github.com/aave/aave-v3-core.git --tag v1.19.4

I have to open an issue that if the tag is or commit is present when you install from git, then that should basically be the "version" field.

@beeb
Copy link
Contributor

beeb commented Mar 17, 2025

I think foundry should use a more relaxed approach to parsing the soldeer config and deps so that we can do the validation in soldeer later on. Also it should use the types we export from soldeer_core. This will give better error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: dependencies Cmd-forge-pm Command: forge install/update/remove
Projects
Status: Todo
Development

No branches or pull requests

4 participants