Represents a node in the call graph, corresponding to a function or method.

Constructors

  • Parameters

    • node:
          | undefined
          | AstFuncId
          | AstExpression
          | AstStatement
          | AstTypeDecl
          | AstFieldDecl
          | AstTypedParameter
          | AstFunctionDef
          | AstAsmFunctionDef
          | AstFunctionDecl
          | AstNativeFunctionDecl
          | AstStructFieldInitializer
          | AstType
          | AstContractInit
          | AstReceiver
          | AstImport
          | AstConstantDef
          | AstConstantDecl

      The AST node of the function. Can be undefined for call nodes.

    • name: string

      The name of the function or method

    • logger: Logger

      A logger instance for logging messages

    Returns CGNode

Properties

astId: undefined | number
effects: number = 0
inEdges: Set<CGEdgeId> = ...
loc: undefined | SrcInfo
name: string

The name of the function or method

outEdges: Set<CGEdgeId> = ...
stateAccess: Map<StateKind, Set<string>> = ...

Methods

  • Parameters

    • effect: Effect
    • Optionalfields: string[]

      Names of contract fields accessed or modified by the effect.

    Returns void