Attributes
Members list
Type members
Classlikes
Non-deterministic branching — each branch is an independent Scenario.
Non-deterministic branching — each branch is an independent Scenario.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scenario[A]class Objecttrait Matchableclass AnyShow all
Terminal: holds final state and value.
Terminal: holds final state and value.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scenario[A]class Objecttrait Matchableclass AnyShow all
Already-evaluated stream (from fsplit/msplit tails).
Already-evaluated stream (from fsplit/msplit tails).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scenario[A]class Objecttrait Matchableclass AnyShow all
State-dependent continuation.
State-dependent continuation.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scenario[A]class Objecttrait Matchableclass AnyShow all
Error with state for rollback in flatMapTry.
Error with state for rollback in flatMapTry.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scenario[A]class Objecttrait Matchableclass AnyShow all
Async suspension — wait for Future, then continue.
Async suspension — wait for Future, then continue.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Scenario[A]class Objecttrait Matchableclass AnyShow all
Enables implicit conversion from ScalaCheck Gen to Scenario.
Enables implicit conversion from ScalaCheck Gen to Scenario.
Allows writing:
async[Scenario] {
val x = Gen.choose(1, 10).await // implicitly converted via sample
...
}
Attributes
- Supertypes
- Self type
Attributes
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Get the current action log (in chronological order).
Get the current action log (in chronological order).
Attributes
Check a condition, failing the scenario with CheckFailure if false.
Check a condition, failing the scenario with CheckFailure if false.
This is an inline macro that captures the predicate expression, optional message, and source location at compile time.
Usage:
async[Scenario] {
Scenario.check(balance >= 0).await
Scenario.check(owner != null, "owner must be set").await
}
Attributes
Create non-deterministic choices from the given values.
Create non-deterministic choices from the given values.
Attributes
Get the current emulator state (read-only snapshot).
Get the current emulator state (read-only snapshot).
Attributes
Raise an error in the current branch.
Raise an error in the current branch.
Attributes
Evaluate a Scenario tree to a LogicStreamT of (state, value) pairs.
Evaluate a Scenario tree to a LogicStreamT of (state, value) pairs.
Attributes
Explore contract interactions up to a maximum depth.
Explore contract interactions up to a maximum depth.
Convenience method that delegates to ScenarioExplorer.explore.
The step function receives a BlockchainReader and should perform one step of the contract interaction using normal Scenario operations (submit, sleep, etc.). Actions are automatically logged and included in Violation.path if a check fails.
Value parameters
- maxDepth
-
maximum number of steps to explore
- step
-
function that performs one interaction step; use Scenario.check for invariants, Scenario.choices/Scenario.fromCollection for branching
Attributes
- Returns
-
Scenario returning None if all paths succeeded, Some(Violation) if a check failed
Always-failing computation (prunes this branch).
Always-failing computation (prunes this branch).
Attributes
Create non-deterministic choices from a collection.
Create non-deterministic choices from a collection.
Attributes
Prune this branch if the condition is false.
Prune this branch if the condition is false.
Attributes
Get a BlockchainProviderTF that operates within the Scenario monad.
Get a BlockchainProviderTF that operates within the Scenario monad.
Each call reads/updates the latest emulator state.
Attributes
Evaluate and run a scenario, returning the raw LogicStreamT.
Evaluate and run a scenario, returning the raw LogicStreamT.
Attributes
Run a scenario and collect all successful results (up to n, default 1000).
Run a scenario and collect all successful results (up to n, default 1000).
Attributes
Run a scenario and return the first successful result.
Run a scenario and return the first successful result.
Attributes
Sample a value from a ScalaCheck generator using the scenario's RNG.
Sample a value from a ScalaCheck generator using the scenario's RNG.
The RNG state is advanced deterministically, ensuring reproducible execution across branches. If the generator fails to produce a value, this branch is pruned (returns mzero).
Attributes
Sample N values from a generator, creating N branches.
Sample N values from a generator, creating N branches.
Each branch receives a different sampled value and its own RNG state. Failed samples are filtered out.
Attributes
Advance the slot by the given number of slots.
Advance the slot by the given number of slots.
Attributes
Get a read-only BlockchainReader snapshot from the current state.
Get a read-only BlockchainReader snapshot from the current state.
Attributes
Submit a transaction, updating the emulator state if successful.
Submit a transaction, updating the emulator state if successful.
On success, the transaction is logged to the action log.
Attributes
Deprecated methods
Get a read-only BlockchainProvider snapshot from the current state.
Get a read-only BlockchainProvider snapshot from the current state.
Attributes
- Deprecated
-
[Since version 0.14.2]Use snapshotReader insteadUse snapshotReader instead. The
submitmethod on this provider discards state changes which is misleading.
Givens
Givens
Enables implicit conversion from ScalaCheck Gen to Scenario.
Enables implicit conversion from ScalaCheck Gen to Scenario.
Allows writing:
async[Scenario] {
val x = Gen.choose(1, 10).await // implicitly converted via sample
...
}