You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DaniPopes I struggled with the same issue on abigen as well...
I think we can solve this by
including the contract information in It to make them truly unique
find a way to name duplicated structs, in abigen I simply started numerating them, but we can also append the parent projection, although this can again lead to naming conflicts like A.B.CD.B.C, so this only works if we concat all parents...
however this does not solve naming entirely, because when we print params we now also now need to know the name of the type we just renamed
we also don't want to do this if there aren't any conflicts
Component
json-abi, sol! macro
What version of Alloy are you on?
v0.7.6
Operating System
Linux
Describe the bug
If a struct is in a library, the library path is lost when generating code from the json abi.
Take the following solidity code:
this generates the following (abridged) rust code:
LibA.Struct
has "overwritten"LibB.Struct
, and as such bothconstructor
andfn
have invalid signatures.The contract qualifier is dropped here
core/crates/json-abi/src/to_sol.rs
Lines 179 to 181 in 3b973cc
The text was updated successfully, but these errors were encountered: