Open 0xlinus opened 1 year ago
Anyone?
Might be wrong, but I think it's 'cos the struct, when it's returned, is treated as a tuple rather than the struct type specified. I don't know why this happens with structs but I vaguely recall encountering something like this before.
I think the error is showing you that it's a tuple: Library::addData((1, 2))
, where the calldata (1, 2)
is a tuple rather than the Data struct
I'm not 100% sure tho
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (7398b65 2023-03-30T00:08:17.480091977Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
I'm trying to test a library doing the following:
This reverts with the following logs:
This works fine if:
This also passes if
Library
is acontract
instead of alibrary
This also passes if
deployCode
is not used, and tests are:Why is this failing when using
calldata
arguments +deployCode
?Thanks