Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BabbageContextError era
- = AlonzoContextError !(AlonzoContextError era)
- | ByronTxOutInContext !(TxOutSource (EraCrypto era))
- | RedeemerPointerPointsToNothing !(PlutusPurpose AsIx era)
- | InlineDatumsNotSupported !(TxOutSource (EraCrypto era))
- | ReferenceScriptsNotSupported !(TxOutSource (EraCrypto era))
- | ReferenceInputsNotSupported !(Set (TxIn (EraCrypto era)))
- transReferenceScript ∷ ∀ era. EraScript era ⇒ StrictMaybe (Script era) → Maybe ScriptHash
- transTxOutV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ TxOutSource (EraCrypto era) → TxOut era → Either (ContextError era) TxOut
- transTxOutV2 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ TxOutSource (EraCrypto era) → TxOut era → Either (ContextError era) TxOut
- transTxInInfoV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ UTxO era → TxIn (EraCrypto era) → Either (ContextError era) TxInInfo
- transTxInInfoV2 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ UTxO era → TxIn (EraCrypto era) → Either (ContextError era) TxInInfo
- transTxRedeemers ∷ (EraPlutusTxInfo l era, AlonzoEraTxBody era, EraTx era, AlonzoEraTxWits era, Inject (BabbageContextError era) (ContextError era)) ⇒ proxy l → ProtVer → Tx era → Either (ContextError era) (Map (PlutusScriptPurpose l) Redeemer)
- transRedeemer ∷ Data era → Redeemer
- toPlutusV2Args ∷ EraPlutusTxInfo 'PlutusV2 era ⇒ proxy 'PlutusV2 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV2)
Documentation
data BabbageContextError era Source #
AlonzoContextError !(AlonzoContextError era) | |
ByronTxOutInContext !(TxOutSource (EraCrypto era)) | |
RedeemerPointerPointsToNothing !(PlutusPurpose AsIx era) | |
InlineDatumsNotSupported !(TxOutSource (EraCrypto era)) | |
ReferenceScriptsNotSupported !(TxOutSource (EraCrypto era)) | |
ReferenceInputsNotSupported !(Set (TxIn (EraCrypto era))) |
Instances
transReferenceScript ∷ ∀ era. EraScript era ⇒ StrictMaybe (Script era) → Maybe ScriptHash Source #
transTxOutV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ TxOutSource (EraCrypto era) → TxOut era → Either (ContextError era) TxOut Source #
Given a TxOut, translate it for V2 and return (Right transalation). If the transaction contains any Byron addresses or Babbage features, return Left.
transTxOutV2 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ TxOutSource (EraCrypto era) → TxOut era → Either (ContextError era) TxOut Source #
Given a TxOut, translate it for V2 and return (Right transalation). It is possible the address part is a Bootstrap Address, in that case return Left.
transTxInInfoV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ UTxO era → TxIn (EraCrypto era) → Either (ContextError era) TxInInfo Source #
Given a TxIn, look it up in the UTxO. If it exists, translate it to the V1 context
transTxInInfoV2 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ UTxO era → TxIn (EraCrypto era) → Either (ContextError era) TxInInfo Source #
Given a TxIn, look it up in the UTxO. If it exists, translate it to the V2 context
transTxRedeemers ∷ (EraPlutusTxInfo l era, AlonzoEraTxBody era, EraTx era, AlonzoEraTxWits era, Inject (BabbageContextError era) (ContextError era)) ⇒ proxy l → ProtVer → Tx era → Either (ContextError era) (Map (PlutusScriptPurpose l) Redeemer) Source #
Translate all Redeemers
from within a Tx
into a Map from a PlutusScriptPurpose
to a Redeemer
transRedeemer ∷ Data era → Redeemer Source #
toPlutusV2Args ∷ EraPlutusTxInfo 'PlutusV2 era ⇒ proxy 'PlutusV2 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV2) Source #