warp
warp copied to clipboard
Stop warp mangling if no overloading
Add a new flag --no-mangle which makes sure that the function names are not mangled if the functions are not overloaded.
If the flag is passed and function names are overloaded then it should throw an error and ask the user to retry without the flag.
Make sure that this code is tested.
The output of the Cairo code should have a sigil comment that the function in that particular contract are not mangled. So that tools like hardhat-warp can handle both cases
If we are going to go this route I recommend we drop mangling by default. In the case where there is overloading we should mangle only the instances that are overloaded and add a sigil to the Cairo stating which functions have been mangled.
This is now being handled by https://github.com/NethermindEth/warp/pull/880. This pr mangles only in the circumstance that overloading has occurred.