ApeWorX / ethpm-types

Implementation of EIP-2678
Apache License 2.0
14 stars 8 forks source link

fix: compilers with different settings were not disinguished #104

Closed antazoey closed 9 months ago

antazoey commented 9 months ago

What I did

__eq__ and __hash__ in Compiler did not account for settings. This is actually really important in ape-vyper right now, as it groups input selections based on optimization pragmas.

How I did it

first stringify settings dict in a sorted consistent way without outputSelection in it. Now, only compiler settings like evmVersion or optimization settings affect the str.

then place that str in the hash

How to verify it

when using ape-vyper 's 0.7 PR you can compile a contract with opimization pragma and it gets own Compiler entry separate from the others using the same version..

See test updates on this PR for a simpler example lol.

Checklist