-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error when testing or deploying a contract containing a library function call. #6
Comments
Maybe the problem in foundry (foundry-rs/book#1361) |
The issue is that the artifact folder now has multiple files with the included lib and you should specify the contract location via "Counter.sol:Counter". However, I added an extra search for "{Contract}.sol:{Contract}" and 9112da4 should fix this. Also should have better error logging now. Let me know if it works. |
@kalloc actually there seems to be another issue related to this. I think foundry doesn't handle public library linking well. You might want to change function x() public pure returns (uint256) {
return X;
} to function x() internal pure returns (uint256) {
return X;
} |
Yes, I did it. And I learned that it is foundry issue. https://github.com/8gen/foundry-library-linking-bug <https://github.com/8gen/foundry-library-linking-bug> I did simplified example
|
Closing this here then for now |
Hi.
Thank you very much for your work.
But, I found a mistake while using it.
If the contract under test contains a library function call, the testing fails.
I made a repo with an error https://github.com/8gen/0xPhaze-upgrade-script-bug, so you may repeat.
How I call function:
The text was updated successfully, but these errors were encountered: