Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ConwayContextError era
- = BabbageContextError !(BabbageContextError era)
- | CertificateNotSupported !(TxCert era)
- | PlutusPurposeNotSupported !(PlutusPurpose AsItem era)
- | CurrentTreasuryFieldNotSupported !Coin
- | VotingProceduresFieldNotSupported !(VotingProcedures era)
- | ProposalProceduresFieldNotSupported !(OSet (ProposalProcedure era))
- | TreasuryDonationFieldNotSupported !Coin
- transTxBodyWithdrawals ∷ EraTxBody era ⇒ TxBody era → Map Credential Lovelace
- transTxCert ∷ ConwayEraTxCert era ⇒ ProtVer → TxCert era → TxCert
- transDRepCred ∷ Credential 'DRepRole c → DRepCredential
- transColdCommitteeCred ∷ Credential 'ColdCommitteeRole c → ColdCommitteeCredential
- transHotCommitteeCred ∷ Credential 'HotCommitteeRole c → HotCommitteeCredential
- transDelegatee ∷ Delegatee c → Delegatee
- transDRep ∷ DRep c → DRep
- transScriptPurpose ∷ (ConwayEraPlutusTxInfo l era, PlutusTxCert l ~ TxCert) ⇒ proxy l → ProtVer → ConwayPlutusPurpose AsIxItem era → Either (ContextError era) ScriptPurpose
- transMap ∷ (t1 → k) → (t2 → v) → Map t1 t2 → Map k v
- transTxInInfoV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ UTxO era → TxIn (EraCrypto era) → Either (ContextError era) TxInInfo
- transTxOutV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue (EraCrypto era), BabbageEraTxOut era) ⇒ TxOutSource (EraCrypto era) → TxOut era → Either (ContextError era) TxOut
- toPlutusV3Args ∷ EraPlutusTxInfo 'PlutusV3 era ⇒ proxy 'PlutusV3 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV3)
Documentation
data ConwayContextError era Source #
Instances
transTxBodyWithdrawals ∷ EraTxBody era ⇒ TxBody era → Map Credential Lovelace Source #
Translate all Withdrawal
s from within a TxBody
transTxCert ∷ ConwayEraTxCert era ⇒ ProtVer → TxCert era → TxCert Source #
In version 9, a bug in RegTxCert
and UnRegTxCert
pattern definitions
was causing the deposit in RegDepositTxCert
and UnRegDepositTxCert
to be omitted.
We need to keep this behavior for version 9, so, now that the bug in the patterns has been fixed,
we are explicitly omitting the deposit in these cases.
transDelegatee ∷ Delegatee c → Delegatee Source #
transScriptPurpose ∷ (ConwayEraPlutusTxInfo l era, PlutusTxCert l ~ TxCert) ⇒ proxy l → ProtVer → ConwayPlutusPurpose AsIxItem era → Either (ContextError era) ScriptPurpose Source #
In Conway we have Anchor
s in some certificates and all proposals. However, because
we do not translate anchors to plutus context, it is not always possible to deduce
which item the script purpose is responsible for, without also including the index for
that item. For this reason starting with PlutusV3, besides the item, Certifying
and Proposing
also have an index. Moreover, other script purposes rely on Ledger
Ord
instances for types that dictate the order, so it might not be a good idea to pass
that information to Plutus for those purposes.
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
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.
toPlutusV3Args ∷ EraPlutusTxInfo 'PlutusV3 era ⇒ proxy 'PlutusV3 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV3) Source #