Skip to content

sourcetruthSee what contract code really does

Point it at Daml or Solidity. It maps who can act and what every action changes — and marks anything it couldn’t trace, instead of guessing.

sourcetruthsourcetruth

Try it without installing

This is the real output of sourcetruth --demo on the example vault. Pick a step, or click around the map yourself.

Generated with sourcetruth --demo from the examples in the repository. Open this map in its own tab

Install and run

Node 22 or newer, no dependencies. Install it, draw the map above on your machine, then map your own code.

bash
npm install -g @prajwalghate/sourcetruth
sourcetruth --demo -o demo.html
sourcetruth ./contracts --html -o map.html

Three rules it never breaks

Comments are never evidence

Every comment is stripped before a line is read. If a comment says a function is admin-only and the code says otherwise, the map shows the code.

Blind spots are never guessed

A call whose target can’t be named is reported with its source line. An arrow that isn’t there means “unproven”, never “nothing there”.

Access comes from code, not names

Who is inside the protocol is derived from signatories and checks. A function named onlyOwner that doesn’t check the caller is shown as open.

A map on every pull request

The GitHub Action uploads the map as an artifact, writes a summary on the run, and fails the build when tracing drops below your floor — the signal that code arrived the tool can’t follow.

yaml
- uses: actions/checkout@v7
  with:
    submodules: recursive
- uses: prajwalghate/sourcetruth@v0
  with:
    path: ./contracts
    min-resolution: 90

Released under the MIT License.