Algorand TypeScript Testing
    Preparing search index...

    Class TestExecutionContext

    The TestExecutionContext class provides a context for executing tests in an Algorand environment. It manages various contexts such as contract, ledger, and transaction contexts, and provides utilities for generating values, managing accounts, and handling logic signatures.

    Index

    Constructors

    Accessors

    • get defaultSender(): Account

      Returns the default sender account.

      Returns Account

    • set defaultSender(val: bytes | Account): void

      Sets the default sender account.

      Parameters

      • val: bytes | Account

        The default sender account.

      Returns void

    Methods

    • Executes a logic signature with the given arguments.

      Parameters

      • logicSig: LogicSig

        The logic signature to execute.

      • ...args: bytes[]

        The arguments for the logic signature.

      Returns boolean | uint64

    • Reinitializes the execution context, clearing all state variables and resetting internal components. Invoked between test cases to ensure isolation.

      Returns void

    • Sets a compiled logic signature.

      Parameters

      • c: ConstructorFor<LogicSig>

        The logic signature class.

      • account: Account

        The account associated with the logic signature.

      Returns void

    • Sets a template variable.

      Parameters

      • name: string

        The name of the template variable.

      • value: any

        The value of the template variable.

      • Optionalprefix: string

        The prefix for the template variable.

      Returns void