Module run

Module run 

Source
Expand description

Utilities for running Leo programs in test environments.

Currently this is used by:

  • the test runner in test_execution.rs,
  • the interpreter tests in interpreter/src/test_interpreter.rs, and
  • the leo test command in cli/commands/test.rs.

leo-compiler is not necessarily the perfect place for it, but it’s the easiest place for now to make it accessible to all of these.

Provides functions for:

  • Running programs without a ledger (run_without_ledger). To be used for evaluating non-async code.
  • Running programs with a full ledger (run_with_ledger), including setup of VM, blocks, and execution tracking. To be used for executing async code.

Also defines types for program configuration, test cases, and outcomes.

Structs§

Case
A particular case to run.
Config
Programs and configuration to run.
EvaluationOutcome
Outcome of an evaluation-only run (no execution trace, no verification).
ExecutionOutcome
Outcome that includes execution and verification details.
Outcome
Shared fields for all outcome types.
Program
A program to deploy to the ledger.

Enums§

EvaluationStatus
ExecutionStatus
The status of a case that was run.

Functions§

run_with_ledger
Run the functions indicated by cases from the programs in config.
run_without_ledger
Evaluates a set of cases against some programs without using a ledger.

Type Aliases§

CurrentNetwork 🔒