An opaque context in which the builder operates.
TODO: make a class, remove toTuple()?
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
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
Balance the transaction, handling dummy signatures and collateral return.
Balance the transaction, handling dummy signatures and collateral return.
This method:
- Adds dummy signatures for accurate fee calculation
- Ensures min ADA on all outputs
- Balances fees and change
- Handles collateral return output
- Removes dummy signatures
Call validateContext after this to validate the balanced transaction.
Attributes
balanceContext against certState: a pool registration pays no pool deposit for a pool that certState registers.
balanceContext against certState: a pool registration pays no pool deposit for a pool that certState registers.
Attributes
Ensure that all transaction outputs in the context have min ada.
Ensure that all transaction outputs in the context have min ada.
Attributes
Set min ada, balance, and validate a context. Validates against a treasury of zero, like the 4-argument validate. Balancing and validation both use certState, so a pool registration pays no pool deposit for a pool that certState registers.
Set min ada, balance, and validate a context. Validates against a treasury of zero, like the 4-argument validate. Balancing and validation both use certState, so a pool registration pays no pool deposit for a pool that certState registers.
Value parameters
- certState
-
the certificate state for validation context (default: empty)
- diffHandler
-
the handler for managing transaction balance differences (change)
- evaluator
-
the Plutus script evaluator
- protocolParams
-
the protocol parameters
- slot
-
the current slot number for validation context (default: 1)
- validators
-
the ledger rule validators to run
Attributes
- Returns
-
the finalized context or an error
finalizeContext against treasury, the value a tx must state as its currentTreasuryValue.
Conversion help to Scalus scalus.cardano.ledger.Utxos
Validate a context according to a set of ledger rules.
Validate a context according to a set of ledger rules.
Validates against a treasury of zero, so TreasuryValueMismatchValidator rejects a tx that states a non-zero currentTreasuryValue. To validate against the real treasury, call validate(validators, protocolParams, slot, certState, treasury).
Value parameters
- certState
-
the certificate state for validation context (default: empty)
- protocolParams
-
the protocol parameters
- slot
-
the current slot number for validation context (default: 1)
- validators
-
the ledger rule validators to run
Attributes
- Returns
-
the validated context or a validation error
Validate the transaction against ledger rules.
Validate the transaction against ledger rules.
Adds dummy signatures during validation to ensure accurate signature count validation, then removes them before returning. Validates against a treasury of zero, like the 4-argument validate.
Value parameters
- certState
-
the certificate state for validation context (default: empty)
- protocolParams
-
the protocol parameters
- slot
-
the current slot number for validation context (default: 1)
- validators
-
the ledger rule validators to run
Attributes
- Returns
-
the validated context or a validation error
validateContext against treasury, the value a tx must state as its currentTreasuryValue.
Inherited methods
Attributes
- Inherited from:
- Product
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. Note: delayedRedeemerSpecs is excluded since it contains lambdas that can't be compared.
Extract tupled information from a Context. This method is provided to avoid breaking opacity while making it easier to check for equality in testing. Note: delayedRedeemerSpecs is excluded since it contains lambdas that can't be compared.