Git Product home page Git Product logo

origin-tracer's Introduction

origin_github_banner

Origin Tracer

Tracer Screenshot

Origin Tracer provides a visual way to debug and understand the actual execution flow of a given ethereum transaction.

It's a great way to:

  • Visualize the flow of a transaction across many contracts.
  • Debug what went wrong with your transaction.
  • Get a feel for what bytecodes in a transaction affect gas prices.
  • Learn how the Ethereum virtual machine actually works under the hood.
  • Understand what the solidity compiler generates.

Warning: The current way it pulls traces from etherscan is broken. Code up a fix that uses an Alchemy/Infura API provider/key and you will be a hero.

Using

We'll bring it up on it's own domain very soon! For now, download, npm install --only=dev, npm run start, and go to http://localhost:9001/.

Origin Make Offer (proxied) http://localhost:9001/#0xe2f935e6b55a64d9550b664221103d3714137af569dc9f2f494c81261a75f094

Weird and funky http://localhost:9001/#0x4ca8ea2e822c2904313cad23e79a252e58f4e864332c848d9ea3908960a01d6d

Giant DIAish one http://localhost:9001/#0x6e4e39723778155dca504fef42b44e6b9290d33b4d478486cb60170f9ab18485

Developing

We built Origin Tracer as a quick tool to help us quickly understand failing transactions. It is released now because it is very useful as is, but it's certainly not polished. You are welcome to help make it better!

The code is a slightly idiosyncratic. The lead author, in one of his occasional revolts against modern society, made it his mission to not use a single runtime NPM library. The code is written in Typescript but there are zero runtime dependencies on anything. Everything is plain javascript.

Wishlist

Overview:

  • Add an overview section.
  • Show overall gas usage.
  • Show section with logs generated by a transaction. Possibly attempt to decode.
  • Show any revert error messages.

Bytecode:

  • Special color/shape for log bytecodes, since they are important.

Bytecode info box:

  • Show the output of a bytecode.
  • Label and color green each stack input that will be used by a bytecode.
  • Show the data passed as input to each call.

Polish:

  • Loading screen.
  • Host a static transaction file, and default to loading it at startup.
  • Info box needs to change location based if it's near an edge.
  • Provide a way to work off a user selected RPC provider url.

Refactoring:

  • Change layout engine to use operation depth, rather than manually calculating it from bytecodes. This will correctly visualize running out of gas in the middle of a call.
  • html.ts should have the DOM elements it uses passed in, it should not be responsible for finding them itself.

Deploy:

  • Script deploy
  • Host on github pages
  • Host on our own domain.
  • Add license file

origin-tracer's People

Contributors

danielvf avatar

Stargazers

Brett Henderson avatar kaden avatar Aviv avatar Volky avatar  avatar ReferralCrypto.com avatar Huynh Phi Hung avatar nicholashc avatar Will Pankiewicz avatar

Watchers

 avatar Micah Alcorn avatar Tom Linton avatar James Cloos avatar Franck avatar Josh Fraser avatar Matthew Liu avatar  avatar

Forkers

huynhhung0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.