Skip to main content

qualify_shadowed_sibling_module_paths

Function qualify_shadowed_sibling_module_paths 

Source
fn qualify_shadowed_sibling_module_paths(contents: String) -> String
Expand description

Qualifies paths to sibling binding modules when a generated item in the current module shadows that module name.

Alloy names the event enum for a contract module by appending Events to the contract name. If the ABI also contains a sibling contract/interface with that exact name, inherited event parameter types such as IExampleContractEvents::SomeEventData resolve to the local event enum instead of the sibling module that owns SomeEventData. Qualifying those paths with super:: keeps the generated binding compiling without changing the upstream sol! expansion.