Skip to content

pvgo80/easy-tracing

Repository files navigation

Easy-Tracing

This tool is a proof of concept. It aims to represent Foundry traces in a dynamic way, with a set of features to facilitate navigation and analysis:

Easy-Tracing

How it works

The tool is an SPA built with React + Material UI + Ethers.js.

npm i
npm run dev

To get started, you need to generate both ABIs and the traces to be analyzed:

forge build # by default, should create an out/ directory containing all ABIs
forge test -vvvv --json > test-traces.json # -vvvv maxes all info containing on traces

# alternatively, you can generate a cast trace
cast run  0x1f21a...d4 --json > tx-trace.json

Selecting the ABIs is selecting the root folder containing all ABIs to be used when parsing information. Together with the generated traces, it should automatically present a tree containing all info:

Easy-Tracing-Start

On ./test-data you can find some the generated traces and ABIs of uniswapv3-code to test the tool.

Current Features

  • Ability to collapse/expand nodes
  • Hide contracts or methods
  • Highlight contracts or methods
  • Format big numbers
  • Set address alias
  • Toggle details
  • Debug trace info (temp)

Easy-Tracing-Start

Future Features

Discovery: https://dashboard.tenderly.co/public/safe/safe-apps/simulator/e2396777-c433-451c-9e25-933afeedb32d?trace=0.1.3.1 take a look

Low

  • Show hide details/addon sidebar
  • Add error details
  • Display value txs
  • Add hex convertion to int values

Medium

  • Complete layout settings
  • Copy-like commands
  • Display tuples
  • Hide before/after calls
  • Bundle severall cast traces

High

  • Support for fuzz/ invariant tests
  • Add plugin logic for custom selectors/ contracts. Examples:
    • ERC20 displaying values formatted with respective decimals
    • Uniswap pools converting prices

About

SPA tool to visualize foundry traces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published