Consensys / surya

A set of utilities for exploring Solidity contracts
Apache License 2.0
1.06k stars 118 forks source link

[Graph] Different styling for Custom Errors #170

Closed tintinweb closed 1 year ago

tintinweb commented 2 years ago

copy pasting from: https://github.com/ConsenSys/vscode-solidity-auditor/issues/101 original author: @C-Mierez


Greetings.

This is a bit of niche suggestion perhaps, but I noticed when generating a graph on a contract that has Custom Errors defined, these are graphed the same way as regular functions.

For example, given this contract:

The generated graph is:

I like the idea of having errors showing in the graph, but it would be nice if they had some different styling to tell them apart from actual contract functions.

And as a side-note, it's interesting that events are not included at all. Perhaps that's something that could be looked into as well.

GNSPS commented 1 year ago

Fixed it by adding a new flag to the command and changing the design of error nodes! 😊