ContractTestActor

scalus.testing.ContractTestActor
See theContractTestActor companion trait

Attributes

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

Members list

Value members

Concrete methods

def multi[S](actorName: String, buildTxs: (BlockchainReader, S) => Future[Seq[Transaction]]): ContractTestActor[S]

Create an actor that produces multiple transactions.

Create an actor that produces multiple transactions.

When buildTxs returns empty, the actor produces no actions.

Value parameters

actorName

human-readable name

buildTxs

builds completed, signed transactions

Attributes

def simple[S](actorName: String, buildTx: (BlockchainReader, S) => Future[Option[Transaction]]): ContractTestActor[S]

Create an actor from a simple transaction builder. No variations.

Create an actor from a simple transaction builder. No variations.

When buildTx returns None, the actor produces no actions. When it returns Some(transaction), the actor produces a single Submit action.

Value parameters

actorName

human-readable name

buildTx

builds a completed, signed transaction, or None if the actor cannot act

Attributes

def withVariations[S](actorName: String, baseTx: (BlockchainReader, S) => Future[Option[TxTemplate]], txVariations: TxVariations[S] = ...): ContractTestActor[S]

Create an actor that builds a base transaction and applies variations (attack patterns).

Create an actor that builds a base transaction and applies variations (attack patterns).

When baseTx returns None, the actor produces no actions (it cannot act in the current state). When it returns Some(template), the actor produces the base transaction plus all variation transactions.

Value parameters

actorName

human-readable name

baseTx

builds the base transaction template, or None if the actor cannot act

txVariations

variations to apply to the base template (default: empty)

Attributes