ContractTestActor

scalus.testing.ContractTestActor
See theContractTestActor companion object

An actor (participant) that interacts with a contract under test.

Each actor represents a role in the contract interaction — a bidder, a donor, an attacker, etc. Given the current blockchain state, an actor generates the actions it can take — transactions to submit and/or slot delays to wait.

Use actors with ContractStepVariations.fromActors to compose multi-actor test scenarios.

Type parameters

S

the contract state type

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def actions(reader: BlockchainReader, state: S)(using ExecutionContext): Future[Seq[StepAction]]

Generate actions this actor can take given current state.

Generate actions this actor can take given current state.

Returns empty if the actor cannot act in the current state.

Attributes

def name: String

Human-readable name for diagnostics.

Human-readable name for diagnostics.

Attributes