Context

scalus.cardano.txbuilder.TransactionBuilder.Context
See theContext companion object
case class Context(transaction: Transaction, redeemers: Seq[DetachedRedeemer], network: Network, expectedSigners: Set[ExpectedSigner], resolvedUtxos: ResolvedUtxos, delayedRedeemerSpecs: Seq[DelayedRedeemerSpec] = ...)

An opaque context in which the builder operates.

TODO: make a class, remove toTuple()?

Attributes

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

Members list

Value members

Concrete methods

def addSigners(additionalSigners: Set[ExpectedSigner]): Context

Add additional signers to the Context.

Add additional signers to the Context.

Attributes

def balance(diffHandler: DiffHandler, protocolParams: ProtocolParams, evaluator: PlutusScriptEvaluator): Either[TxBalancingError, Context]

Balance the transaction in a context, adding and removing mock signatures where necessary.

Balance the transaction in a context, adding and removing mock signatures where necessary.

Attributes

def ensureMinAdaAll(protocolParams: ProtocolParams): Context

Ensure that all transaction outputs in the context have min ada.

Ensure that all transaction outputs in the context have min ada.

Attributes

def finalizeContext(protocolParams: ProtocolParams, diffHandler: DiffHandler, evaluator: PlutusScriptEvaluator, validators: Seq[Validator]): Either[SomeBuildError, Context]

Set min ada, balance, and validate a context. TODO: @Ilia consider putting PP, evaluator, and validators, into the parameters for the transaction builder class

Set min ada, balance, and validate a context. TODO: @Ilia consider putting PP, evaluator, and validators, into the parameters for the transaction builder class

Attributes

Conversion help to Scalus scalus.cardano.ledger.Utxos

Conversion help to Scalus scalus.cardano.ledger.Utxos

Attributes

def replaceRedeemers(newRedeemers: Seq[DetachedRedeemer]): Context
def validate(validators: Seq[Validator], protocolParams: ProtocolParams): Either[TransactionException, Context]

Validate a context according so a set of ledger rules

Validate a context according so a set of ledger rules

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

Extract tupled information from a Context. This method is provided to avoid breaking opacity while making it easier to check for equality in testing.

Extract tupled information from a Context. This method is provided to avoid breaking opacity while making it easier to check for equality in testing.

Attributes