Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 1.91 KB

README.md

File metadata and controls

57 lines (40 loc) · 1.91 KB

Important

thoth-sierra has been rewritten in Rust in a new version: sierra-analyzer. It contains all the features of thoth-sierra (CFG, Callgraph, decompiler, detectors) and is more maintainable and efficient.

Decompile the Sierra file

 thoth-sierra -f ./tests/sierra_files/fib.sierra -d

Print the contract's Call Graph

thoth-sierra -f ./tests/sierra_files/testing.sierra --call

# Output the callgraph to a custom folder (default is ./output_callgraph)
thoth-sierra -f ./tests/sierra_files/testing.sierra --call -output_callgraph_folder ./test 

# Output the callgraph in a specific format (pdf/png/svg, default is pdf)
thoth-sierra -f ./tests/sierra_files/testing.sierra --call --format png

Print the contract's Control-Flow Graph

thoth-sierra -f ./tests/sierra_files/fib_box.sierra --cfg

# Output the Control-Flow Graph to a custom folder (default is ./output_callgraph)
thoth-sierra -f ./tests/sierra_files/fib_box.sierra --cfg -output_callgraph_folder ./test 

# Output the Control-Flow Graph in a specific format (pdf/png/svg, default is pdf)
thoth-sierra -f ./tests/sierra_files/fib_box.sierra --cfg --format png

# Create the CFG for a single function
thoth-sierra -f ./tests/sierra_files/minimal_contract.sierra --cfg --function minimal_contract::minimal_contract::MinimalContract::__external::empty

Run the analyzers

thoth-sierra -f tests/sierra_files/cairo_if_list.sierra -a