Represents an entry for a contract in the compilation unit which encapsulates a collection of related methods and their configurations.

Constructors

Properties

Constructors

  • Creates an instance of Contract.

    Parameters

    • name: ContractName

      The unique name identifying this contract within the project.

    • methods: Map<CFGIdx, CFG>

      A mapping of method ids to their CFGs.

    • ref: SrcInfo

      AST reference that corresponds to the contract definition.

    • idx: undefined | ContractIdx = undefined

      An optional unique index. If not set, a new one will be chosen automatically.

    Returns Contract

Properties

The unique identifier of this Contract among the compilation unit it belongs to.

methods: Map<CFGIdx, CFG>

A mapping of method ids to their CFGs.

The unique name identifying this contract within the project.

ref: SrcInfo

AST reference that corresponds to the contract definition.