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

Include tests that depend on linked libraries in Foundry devchain integration test #11016

Open
arthurgousset opened this issue Jun 5, 2024 · 1 comment

Comments

@arthurgousset
Copy link
Contributor

arthurgousset commented Jun 5, 2024

In Foundry integration tests (for the devchain), we cannot test contracts that depend on linked libraries because vm.getDeployedCode() cannot fetch bytecode of contracts that depend on linked libraries. This is a known limitation of Foundry at the moment.

They merged a PR that fixes this:

Unfortunately, we can't use the latest version, because of a regression it has in finding artifacts, which is a known issue:

As soon we can bump the version, it might be good to include contracts that depend on linked libraries in the tests.

Practically, this would simply involve removing this if-clause:

// Skipping test for contracts that depend on linked libraries
// This is a known limitation in Foundry at the moment:
// Source: https://github.com/foundry-rs/foundry/issues/6120
if (
hashContractName != hashAccount &&
hashContractName != hashElection &&
hashContractName != hashEscrow &&
hashContractName != hashFederatedAttestations &&
hashContractName != hashGovernance &&
hashContractName != hashSortedOracles &&
hashContractName != hashValidators
) {

Originally encountered this limitation in this PR:

@arthurgousset
Copy link
Contributor Author

This is is blocked by a regression introduce in the latest foundry version. As a next step, I'd like to make sure a bug is filed or add a comment to an existing but report, so this can be fixed in a future release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant