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
If two solidity files define structs with the same names, we can get naming collisions. To avoid problems from this, we should update the names of the structs to include the contract name, i.e.
This is a bit cumbersome but will fix the issue. We could get smarter in the generated code and allow just importing the module and subscript the structs, i.e.
This will cause some problems though for the templating machine though so the first fix of including the contract name in the struct name should be used first.
The text was updated successfully, but these errors were encountered:
Fixes an issue where struct references don't get matched up correctly.
See new `struct_references` test that highlights this issue.
- When finding what type files to import when building type files (for
struct references in other files), we look at the contract name of
structs instead of looking for structs in abis.
- Always reference a fully qualified name for nested structs. This
solves issues around creating the return type data structure when doing
`function.call()`.
- Define the python type as the fully qualified name. This solves an
issue with structures in different file references and functions
returning a vector of the struct.
- Handle the case when a struct doesn't get referenced with a contract
name in the abi.
- Fix to handling of struct arrays as input/output to functions with
fully qualified names for structs.
This might solve #98
If two solidity files define structs with the same names, we can get naming collisions. To avoid problems from this, we should update the names of the structs to include the contract name, i.e.
ContactA_SimpleStruct
ContractB_SimpleStruct
IContract_SimpleStruct
This is a bit cumbersome but will fix the issue. We could get smarter in the generated code and allow just importing the module and subscript the structs, i.e.
This will cause some problems though for the templating machine though so the first fix of including the contract name in the struct name should be used first.
The text was updated successfully, but these errors were encountered: