ApeWorX / ethpm-types

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

feat: add source map #2

Closed fubuloubu closed 2 years ago

fubuloubu commented 2 years ago

What I did

This PR adds support for the "source map", which is a way to map the program execution of an EVM program to it's corresponding source code, stored in a compressed format. This PR also adds a "decompression" method SourceMap.parse. Lastly, this PR adds an unregistered optional key to the ContractType data field .sourcemap which contains a link to this information.

This object can be used in various ape compiler plugins to build a link between programmatic execution and source code listings, in order to display proper contract execution failures, execution traces, and to obtain coverage information from a test suite.

note: also updated several config files to prevent errors from linting locally

Checklist