Function generateScenarioBCH

  • Generate a scenario given a compiler configuration. If neither scenarioId or unlockingScriptId are provided, the default scenario for the compiler configuration will be generated.

    Returns either the full CompilationData for the selected scenario or an error message (as a string).

    Note, this method should typically not be used directly, use Compiler.generateScenario instead.

    Type Parameters

    Parameters

    • __namedParameters: {
          configuration: Configuration;
          generateBytecode: GenerateBytecode;
          lockingScriptId?: string;
          scenarioId?: string;
          unlockingScriptId?: string;
      }
      • configuration: Configuration

        The compiler configuration from which to generate the scenario.

      • generateBytecode: GenerateBytecode
      • Optional lockingScriptId?: string

        If this scenario does not require an unlockingScriptId (an "isolated" locking script with no defined unlocking scripts), the ID of the locking script to generate for this scenario.

        If unlockingScriptId is defined, the locking script ID will be read from configuration, and an error will be produced if lockingScriptId is also defined.

      • Optional scenarioId?: string

        The ID of the scenario to generate. If undefined, the default scenario.

      • Optional unlockingScriptId?: string

        The ID of the unlocking script under test by this scenario. If undefined but required by the scenario, an error will be produced.

    • Optional debug: Debug

    Returns string | (Debug extends true
        ? ScenarioGenerationDebuggingResult<ProgramState>
        : Scenario)

Generated using TypeDoc