warp icon indicating copy to clipboard operation
warp copied to clipboard

Stop warp mangling if no overloading

Open swapnilraj opened this issue 2 years ago • 3 comments

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.

swapnilraj avatar Jan 18 '23 12:01 swapnilraj

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

swapnilraj avatar Jan 18 '23 13:01 swapnilraj

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.

JorikSchellekens avatar Jan 30 '23 10:01 JorikSchellekens

This is now being handled by https://github.com/NethermindEth/warp/pull/880. This pr mangles only in the circumstance that overloading has occurred.

JorikSchellekens avatar Feb 13 '23 13:02 JorikSchellekens