mythx_cli package

mythx_cli.cli

Console script for mythx_cli.

mythx_cli.cli.find_solidity_files(project_dir)[source]

Return all Solidity files in the given directory

This will match all files with the .sol extension.

Parameters:project_dir – The directory to search in
Returns:Solidity files in project_dir or None
mythx_cli.cli.find_truffle_artifacts(project_dir)[source]

Look for a Truffle build folder and return all relevant JSON artifacts.

This function will skip the Migrations.json file and return all other files under <project-dir>/build/contracts/. If no files were found, None is returned.

Parameters:project_dir – The base directory of the Truffle project
Returns:Files under <project-dir>/build/contracts/ or None

mythx_cli.util

mythx_cli.util.get_source_location_by_offset(source, offset)[source]

Retrieve the Solidity source code location based on the source map offset. :param source: The Solidity source to analyze :param offset: The source map’s offset :return: The line number