Tx

org.sigilaris.core.application.transactions.Tx
trait Tx

Transaction trait defining read/write requirements and result types.

A transaction declares:

  • Reads: tuple of table Entry types this transaction reads from
  • Writes: tuple of table Entry types this transaction writes to
  • Result: the type of result produced
  • Event: the type of events emitted

The Reads and Writes types are used for compile-time verification that a reducer has access to all required tables.

Attributes

Example
case class Transfer(from: Address, to: Address, amount: BigInt) extends Tx:
 type Reads = (Entry["accounts", Address, Account], Entry["balances", Address, BigInt])
 type Writes = Entry["balances", Address, BigInt] *: EmptyTuple
 type Result = Unit
 type Event = TransferEvent
Source
Model.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Type members

Types

type Event

The event type emitted by this transaction.

The event type emitted by this transaction.

Attributes

Source
Model.scala
type Reads <: Tuple

Tables this transaction reads from.

Tables this transaction reads from.

Attributes

Source
Model.scala
type Result

The result type produced by applying this transaction.

The result type produced by applying this transaction.

Attributes

Source
Model.scala
type Writes <: Tuple

Tables this transaction writes to.

Tables this transaction writes to.

Attributes

Source
Model.scala