Function safelyExtendCompilationData

  • TODO: fundamentally unsound, migrate to PST format

    Safely extend a compilation data with resolutions provided by other entities (via extractResolvedVariables).

    It is security-critical that compilation data only be extended with expected identifiers from the proper owning entity of each variable. See CompilationData.bytecode for details.

    Returns false if any errors are fatal (the error either cannot be resolved by providing a variable, or the entity ownership of the required variable was not provided in the compilation data).

    Type Parameters

    Parameters

    Returns false | CompilationData<CompilationContext>

    Remarks

    To determine which identifiers are required by a given compilation, the compilation is first attempted with only trusted variables: variables owned or previously verified (like WalletData) by the compiling entity. If this compilation produces a TransactionGenerationError, the error can be provided to safelyExtendCompilationData, along with the trusted compilation data and a mapping of untrusted resolutions (where the result of extractResolvedVariables is assigned to the entity ID of the entity from which they were received).

    The first compilation must use only trusted compilation data

Generated using TypeDoc