plutus-ledger-api-1.60.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.V3.Data.Contexts

Synopsis
type Rep ProtocolVersion # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

type Rep ProtocolVersion = D1 ('MetaData "ProtocolVersion" "PlutusLedgerApi.V3.Data.Contexts" "plutus-ledger-api-1.60.0.0-inplace" 'True) (C1 ('MetaCons "ProtocolVersion_6989586621681057672" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

pattern ProtocolVersion :: Integer -> Integer -> ProtocolVersion #

matchProtocolVersion :: forall r. ProtocolVersion -> (Integer -> Integer -> r) -> r #

pvMajor :: ProtocolVersion -> Integer #

pvMinor :: ProtocolVersion -> Integer #

newtype ChangedParameters #

A Plutus Data object containing proposed parameter changes. The Data object contains a Map with one entry per changed parameter, from the parameter ID to the new value. Unchanged parameters are not included.

The mapping from parameter IDs to parameters can be found in conway.cddl. -- editorconfig-checker-disable-file

Invariant: This map is non-empty, and the keys are stored in ascending order.

Constructors

ChangedParameters 

Instances

Instances details
DefaultUni ()) #

type Rep ScriptContext # 
Instance details

Defined in PlutusLedgerApi.V3.Data.Contexts

type Rep ScriptContext = D1 ('MetaData "ScriptContext" "PlutusLedgerApi.V3.Data.Contexts" "plutus-ledger-api-1.60.0.0-inplace" 'True) (C1 ('MetaCons "ScriptContext_6989586621681067684" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BuiltinData)))

pattern ScriptContext :: TxInfo -> Redeemer -> ScriptInfo -> ScriptContext #

matchScriptContext :: forall r. ScriptContext -> (TxInfo -> Redeemer -> ScriptInfo -> r) -> r #

scriptContextTxInfo :: ScriptContext -> TxInfo #

scriptContextRedeemer :: ScriptContext -> Redeemer #

scriptContextScriptInfo :: ScriptContext -> ScriptInfo #

findOwnInput :: ScriptContext -> Maybe TxInInfo #

Find the input currently being validated.

findDatum :: DatumHash -> TxInfo -> Maybe Datum #

Find the data corresponding to a data hash, if there is one

findDatumHash :: Datum -> TxInfo -> Maybe DatumHash #

Find the hash of a datum, if it is part of the pending transaction's hashes

findTxInByTxOutRef :: TxOutRef -> TxInfo -> Maybe TxInInfo #

Given a UTXO reference and a transaction (TxInfo), resolve it to one of the transaction's inputs (TxInInfo).

Note: this only searches the true transaction inputs and not the referenced transaction inputs.

findContinuingOutputs :: ScriptContext -> List Integer #

Find the indices of all the outputs that pay to the same script address we are currently spending from, if any.

getContinuingOutputs :: ScriptContext -> List TxOut #

Get all the outputs that pay to the same script address we are currently spending from, if any.

txSignedBy :: TxInfo -> PubKeyHash -> List Value #

Get the values paid to a public key address by a pending transaction.

valuePaidTo :: TxInfo -> PubKeyHash -> Value #

Get the total value paid to a public key address by a pending transaction.

valueSpent :: TxInfo -> Value #

Get the total value of inputs spent by this transaction.

valueProduced :: TxInfo -> Value #

Get the total value of outputs produced by this transaction.

ownCurrencySymbol :: ScriptContext -> CurrencySymbol #

The CurrencySymbol of the current validator script.

spendsOutput :: TxInfo -> TxId -> Integer -> Bool #

Check if the pending transaction spends a specific transaction output (identified by the hash of a transaction and an index into that transactions' outputs)