Closed ilamanov closed 5 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
evm-codes | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 12, 2024 0:04am |
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @ilamanov and the rest of your teammates on Graphite
If you currently try to compile the flattened version of
0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
you get an error:This is because ERC20 is inserted twice into the flattened source code. Our current code tries to handle duplicate insertion but it doesn't take into account remappings.
In this particular contract ERC20 is import twice in two different files. Once as
solmate/src/tokens/ERC20.sol
and once aslib/solmate/src/tokens/ERC20.sol
. These are essentially the same file but our code treats them as different files because it doesn't remap imports before checking for duplicates. This PR fixes this.Test plan
• Flatten the code of
0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
in contract viewer • Copy paste the flattened code into Remix and try compile it. • You shouldn't get an error like above.