ApeWorX / ethpm-types

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

feat: add ContractType.pcmap #47

Closed ghost closed 2 years ago

ghost commented 2 years ago

Looks like I'm going to need this for the reverts work

We have sourcemap but that's for the AST specifically, and it's much easier to query pc_pos_map[trace_frame.pc]

Open to suggestions for the field naming and documentation!

ghost commented 2 years ago

This works in tandem with https://github.com/ApeWorX/ape-vyper/pull/51

Both this PR and the other PR can go ahead earlier than a 0.6.0 release, reverts relies on these but not the other way around 🙂

ghost commented 2 years ago

Could we add some sort of model / validation test?

Just added in 339c3c8