Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.1k
Tutorial
Feist Josselin edited this page Feb 15, 2019
·
1 revision
fromslitherimportSlitherslither=Slither('example.sol') For a Slither object, you can access:
slither.pragma_directives: list of the Pragma directivesslither.import_directives: list of the Import directivesslither.source_code: a dictionary that maps a filename to its source codeslither.solc_version: the solc version that was detected
The solc version is detected either by running solc --version or by looking at the version provided by Truffle.
The contracts are acceded through:
slither.contracts: list of all the contractsslither.contracts_derived: list of all the contracts that are not inheritedslither.get_contract_from_name(name): get a contract from a given name (return None if it is not found)