compile.solidity Module

The compile.solidity module

Solidity compilation utilities

solidbyte.compile.solidity.is_solidity_interface_only(filepath: Union[str, pathlib.Path]) → bool[source]

Given a path to a source file, check if the file only defines an interface, but no other contract.

Parameters:filepath – (str or pathlib.Path) Path to the source file to check
Returns:(bool) If it’s recognize as a Solidity interface
solidbyte.compile.solidity.parse_file(filepath: pathlib.Path) → dict[source]

Parse a file using solidity_parser

Parameters:filepath – (str or pathlib.Path) Path to the source file to check
Returns:(dict) A Python dict representation of the source file