solitude.compiler module

class solitude.compiler.Compiler(executable: str, optimize: Optional[int] = None)[source]

Bases: object

Wrapper for the solidity contract compiler

__init__(executable: str, optimize: Optional[int] = None)[source]

Create a compiler instance

  • executable – path to compiler executable binary
  • optimize – solidity optimizer runs, or None
compile(sourcelist: solitude.common.contract_sourcelist.ContractSourceList) → solitude.common.contract_objectlist.ContractObjectList[source]

Compile all contracts in a collection of sources

Parameters:sourcelist – collection of sources as ContractSourceList
Returns:compiled contracts as ContractObjectList