Skip to content

v0.25.0

Choose a tag to compare

@norah1499 norah1499 released this 22 Jun 14:53

Correctness fix: resolve contracts by stable uid, not bare name.

Solidity does not require contract names to be globally unique within a repo. Foundry projects routinely declare two distinct contracts with the same name in different files (e.g. two Pausable contracts where only one declares a given modifier; OpenZeppelin vendored twice). solflow previously keyed contracts by bare name, so a collision silently bound the wrong contract: a KeyError during modifier/inheritance resolution at best, a silently incorrect Flow at worst.

Contract references (declaring contracts and linearization links) now resolve by a stable uid (filename_relative, name). Bare name remains the display identifier, so titles and the index are unchanged. The residual call-target/binding name-resolution paths keep the first registrant and log on a real collision rather than silently overwriting.

Verified across the test suite and several large repos: Solmate unchanged; repos that previously crashed or were at risk of silent misresolution now build complete, correct flows.