da-bao-jian / audit_setup

brownie template with customized Slither functionalities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To run,

pip install -r requirement

For testing, move contracts to /contracts folder and tests to ./tests folder, then run

brownie test tests/<contract name>

All the audit scripts live in ./utils (pending for testing)

  • To pull the original OpenZeppelin contracts into /contracts folder for fixing compiler errors (only works if import statements starts with "@openzeppelin"):
    python3 utils/fetch_openzeppelin.py <contract path: contracts/ERC20.sol>
    
  • To show functions and their visibilities:
    python3 audit.py <contract path: contracts/ERC20.sol> <contract name: ERC20> <option: show-all> 
    
  • To show public functions that should'be been declared external:
    python3 audit.py <contract path: contracts/ERC20.sol> <contract name: ERC20> <option: optimize-sig"> 
    
  • To generate C-risk finding:
    python3 audit.py <contract path: contracts/ERC20.sol> <contract name: ERC20> <option: get-Crisk"> 
    

About

brownie template with customized Slither functionalities

License:MIT License


Languages

Language:Python 59.2%Language:Solidity 36.3%Language:Shell 4.5%