chains-project / scsc

smart contract supply chain
https://chains.proj.kth.se/scsc
1 stars 1 forks source link

add support for graph output #21

Open monperrus opened 1 month ago

monperrus commented 1 month ago

see TODO at the bottom of the README

Stamp9 commented 2 weeks ago

https://graphs.grevian.org/example

Stamp9 commented 2 weeks ago

Hi, @monperrus, for the --json & --dot output, I am wondering what information do we need in the files.

For .json, I generate summary(address & count) of the calls, example can be seen here: https://github.com/chains-project/scsc/blob/poc-graph/scsc/try_exp/0x3451B6b219478037a1AC572706627FC2BDa1e812_21059800_2024_10_27_22_18_51.json

For .dot, I generate file with node, edge and labels, example can be seen here: https://github.com/chains-project/scsc/blob/poc-graph/scsc/traces.dot

Are they what we want?

monperrus commented 2 weeks ago

For .dot, I generate file with node, edge and labels, example can be seen here: poc-graph/scsc/traces.dot

good first version. dot is too primitive because it's not interactive. today, we can generate an HTML page to represent a beautiful graph in an interactive way, using a cool graph JS library.

side-note: we don't print all disjoint subgraphs on the same graph, we print one connected component per file.