SubmitTxCommand

scalus.testing.ContractScalaCheckCommands.SubmitTxCommand
case class SubmitTxCommand(tx: Transaction) extends Command

Command to submit a transaction to the emulator.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Command
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

override type Result = Either[SubmitError, TransactionHash]

An abstract representation of the result of running this command in the system under test. The Result type should be immutable and it should encode everything about the command run that is necessary to know in order to correctly implement the [postCondition] method.

An abstract representation of the result of running this command in the system under test. The Result type should be immutable and it should encode everything about the command run that is necessary to know in order to correctly implement the [postCondition] method.

Attributes

Value members

Concrete methods

override def nextState(state: State): State

Compute the next abstract state after this command.

Compute the next abstract state after this command.

If the transaction succeeds in the abstract model, update the emulator state and extract new contract state. If it fails, just advance the RNG.

Attributes

Definition Classes
override def postCondition(state: State, result: Try[Result]): Prop

Verify the actual result matches expectations.

Verify the actual result matches expectations.

On success, run invariant checks. On transaction rejection, pass (expected for attack variations). On exception, fail with the exception.

Value parameters

result

the actual result from running on the Sut

state

the abstract state ''after'' nextState was called

Attributes

Definition Classes
override def preCondition(state: State): Boolean

Check if this command can be executed in the given state.

Check if this command can be executed in the given state.

Always returns true - transaction rejection is expected behavior for attack variations.

Attributes

Definition Classes
override def run(sut: Sut): Result

Execute the transaction on the system under test.

Execute the transaction on the system under test.

Attributes

Definition Classes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product