Skip to content

Static analysis for Substrate based projects

Notifications You must be signed in to change notification settings

TheCodingWombat/substrace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Substrace: Experimental Static Analysis for Substrate Projects

Substrace is a tool for linting substrate projects for specific gotchas and other errors.

Installing

First install dylint, then add the following to your workspace's cargo.toml:

[workspace.metadata.dylint]
libraries = [
    { git = "https://github.com/kaiserkarel/substrace" },
]

Now running cargo dylint substrace --workspace will download the linter and check your crates. Currently the following lints are used:

  • panics: ensures that clippy has been properly configured to avoid panics in code.
  • storage_iter_insert: checks that storage isn't simultaniously being mutated whilst iteration is active.
  • missing_security_doc: checks for the presence Security headers on storage maps using suspicious hashing functions, such as Twox64Concat.

More lints will be added in the future, initially targetting checks that ensure storage consistencies.

About

Static analysis for Substrate based projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%