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: string

      The unique name identifying this contract within the project.

    • methods: Map<number, CFG>

      A mapping of method ids to their CFGs.

    • ref: SrcInfo

      AST reference that corresponds to the contract definition.

    • idx: undefined | number = undefined

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

    Returns Contract

Properties

idx: number

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

methods: Map<number, CFG>

A mapping of method ids to their CFGs.

name: string

The unique name identifying this contract within the project.

ref: SrcInfo

AST reference that corresponds to the contract definition.