Tool
Visual Inspection Tool
Last updated:
October 12, 2021

Visual Inspection Tools provide visual overview of smart contracts to aid in reading, developing and securing code. Several popular tools exist that each support a wide variety of reports, the most common being Slither and Surya.

Call graph or Control flow graph

The call graph or control flow graph shows the different contracts present in a set of source files. For each contract, all contract functions are highlighted and connected with arrows where they invoke other functions in the same or different contracts.

Call graphs are useful for contract comprehension as well as analyzing where sensitive interactions with external contracts could occur.

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/387cad53-f043-47de-9804-412586d19fa6/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20211012%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211012T095549Z&X-Amz-Expires=86400&X-Amz-Signature=80ba3e97743e700040807f859aab14dfb2bfd2f9d05ef46b8b3a17a1833a5302&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22
Surya call graph, excerpt from Fei V1

Contract function overview

A contract function overview report highlights all functions in a contract along with their respective modifiers. This report is highly useful for looking at access control. Slither 's versions of this report may also incorporate data dependencies and variables written by each function.

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/fd85b91c-2b31-488e-b58b-b891b8ce6aeb/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20211012%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211012T095624Z&X-Amz-Expires=86400&X-Amz-Signature=697a2e12c7536655c631df936e293be19bcfcab3aba4f00775dac77966b72e62&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22
Surya description report, excerpt from Fei V1

Inheritance graph

An inheritance graph shows all contracts and interfaces and their inheritance relationships. It can be used to understand what functions will be available in a top level contract as well as understanding the relationship between different interfaces (e.g., for the purposes of a standards compliance review).

https://s3.us-west-2.amazonaws.com/secure.notion-static.com/18027632-05a3-4e97-bbdb-9334b5c0a97a/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAT73L2G45O3KS52Y5%2F20211012%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211012T095647Z&X-Amz-Expires=86400&X-Amz-Signature=82f3acb0b0ac05ab87c5a847b15ee0f2e8eabec30f649d93012fc4b34a255d41&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22
Surya inheritance graph, excerpt from Fei V1

Function call trace

A function call trace shows a detailed list of all external calls and subcalls initiated by a specific function.

Function signature

Show the keccak256 signature of each function.

Constructor call order

For contracts that inherit from other contracts with multiple constructors, provide a sequence in which the different constructors will be called.

Storage variable order

For contracts that inherit from other contracts, show the storage layout of all the state variables.

EVM representation

Show the EVM representation of each function.

Require and assert report

Show all the require and assert calls as part of each function.

See Also: