TxTemplate

scalus.testing.TxTemplate
case class TxTemplate(builder: TxBuilder, sponsor: Address, signer: TransactionSigner)

A transaction template bundling a builder with its sponsor and signer.

TxTemplate represents a transaction that is ready to be completed and signed. It bundles:

  • builder: the TxBuilder with inputs, outputs, etc.
  • sponsor: the address that pays fees (provides UTxOs for fees/collateral)
  • signer: signs the completed transaction

This allows variations to be self-contained - each variation knows who will sign it.

Attributes

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

Members list

Value members

Concrete methods

def complete(reader: BlockchainReader)(using ExecutionContext): Future[Transaction]

Complete and sign the transaction.

Complete and sign the transaction.

Uses the sponsor's UTxOs for fees and collateral, then signs with the signer.

Attributes

Transform the builder while keeping the same sponsor and signer.

Transform the builder while keeping the same sponsor and signer.

Attributes

Change the signer.

Change the signer.

Attributes

def withSponsor(newSponsor: Address): TxTemplate

Change the sponsor (who pays fees).

Change the sponsor (who pays fees).

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product