ApeWorX / ape

The smart contract development tool for Pythonistas, Data Scientists, and Security Professionals

Home Page:https://apeworx.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(ape test): Include Event definitions in statement-coverage

antazoey opened this issue · comments

Overview

evm-trace is nearly added the ability to see event-node data from struct-log parsing from geth traces:
ApeWorX/evm-trace#66

with this affords us the ability to include Event definition lines in coverage reports. If an event is defined in a contract but never emitted, its definition would not show as hit in the coverage report.

Specification

  • bump evm-trace
  • when profiling a coverage report (ape-vyper), include event definition lines
  • when covering lines, observe events emitted via LOG* opcodes and match them via their selector data back to the definition lines (don't fully know all the parts to doing this, obviously requires some AST stuff).
  • booyah! make sure ape shows these alright in coverage reports

Dependencies

Include links to any open issues that must be resolved before this feature can be implemented.