ContractStepVariations

scalus.testing.ContractStepVariations
See theContractStepVariations companion trait

Bundles contract step state extraction, base template building, and variations.

ContractStepVariations represents a single step in a contract interaction (e.g., "bid on auction", "claim HTLC"). It combines:

  • State extraction from blockchain UTxOs
  • Base template construction (builder + sponsor + signer)
  • Transaction variations for testing

Use with ScenarioExplorer for exhaustive testing.

Type parameters

S

the contract state type

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def fromActors[S](extract: BlockchainReader => ExecutionContext ?=> Future[S], actors: Seq[ContractTestActor[S]], delays: S => Seq[Long] = ...): ContractStepVariations[S]

Create a ContractStepVariations from a set of actors.

Create a ContractStepVariations from a set of actors.

Each actor independently generates actions based on the current state. All actors' actions are combined, along with slot delays.

This is the recommended way to build multi-actor test scenarios where different participants (honest users, attackers, time-based claimants) interact with the same contract.

Value parameters

actors

actors that interact with the contract

delays

slot delays to explore at each step (default: none)

extract

extract contract state from blockchain

Attributes