foundry-rs / compilers

Utilities for working with native solc and compiling projects.
Apache License 2.0
73 stars 41 forks source link

Flatten fixes #63

Closed klkvr closed 8 months ago

klkvr commented 8 months ago

Support for more flattening edge cases.

Resolves https://github.com/foundry-rs/foundry/pull/6936#issuecomment-1916511765 and https://github.com/foundry-rs/foundry/pull/6936#issuecomment-1915222867

We still don't rename stuff in yul blocks.

prb-math turned out to be a great codebase to test flattening against as it has a lot of unusual patterns (qulified imports, user-defined functions on user-defined types, etc). Currently, their contracts flattened by this flattener are only having troubles with yul code blocks