| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Cardano.Ledger.Conway.TxInfo
Contents
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
 - | ReferenceInputsNotDisjointFromInputs !(NonEmpty TxIn)
 
 - class EraPlutusTxInfo l era ⇒ ConwayEraPlutusTxInfo (l ∷ Language) era where
- toPlutusChangedParameters ∷ proxy l → PParamsUpdate era → ChangedParameters
 
 - transTxBodyWithdrawals ∷ EraTxBody era ⇒ TxBody era → Map Credential Lovelace
 - transTxCert ∷ (ShelleyEraTxCert era, ConwayEraTxCert era, TxCert era ~ ConwayTxCert era) ⇒ ProtVer → TxCert era → TxCert
 - transDRepCred ∷ Credential 'DRepRole → DRepCredential
 - transColdCommitteeCred ∷ Credential 'ColdCommitteeRole → ColdCommitteeCredential
 - transHotCommitteeCred ∷ Credential 'HotCommitteeRole → HotCommitteeCredential
 - transDelegatee ∷ Delegatee → Delegatee
 - transDRep ∷ DRep → DRep
 - transMap ∷ (t1 → k) → (t2 → v) → Map t1 t2 → Map k v
 - transTxInInfoV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue, BabbageEraTxOut era) ⇒ UTxO era → TxIn → Either (ContextError era) TxInInfo
 - transTxOutV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue, BabbageEraTxOut era) ⇒ TxOutSource → TxOut era → Either (ContextError era) TxOut
 - transMintValue ∷ MultiAsset → MintValue
 - transTxBodyId ∷ EraTxBody era ⇒ TxBody era → TxId
 - transValidityInterval ∷ ∀ proxy era a. Inject (AlonzoContextError era) a ⇒ proxy era → EpochInfo (Either Text) → SystemStart → ValidityInterval → Either a POSIXTimeRange
 - transVotingProcedures ∷ VotingProcedures era → Map Voter (Map GovernanceActionId Vote)
 - transProposal ∷ ConwayEraPlutusTxInfo l era ⇒ proxy l → ProposalProcedure era → ProposalProcedure
 - toPlutusV3Args ∷ EraPlutusTxInfo 'PlutusV3 era ⇒ proxy 'PlutusV3 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV3)
 - transTxCertV1V2 ∷ (ShelleyEraTxCert era, ConwayEraTxCert era, Inject (ConwayContextError era) (ContextError era)) ⇒ TxCert era → Either (ContextError era) DCert
 - transPlutusPurposeV1V2 ∷ ∀ l era proxy. (PlutusTxCert l ~ DCert, EraPlutusTxInfo l era, Inject (ConwayContextError era) (ContextError era), Inject (ConwayPlutusPurpose AsItem era) (PlutusPurpose AsItem era)) ⇒ proxy l → ProtVer → ConwayPlutusPurpose AsItem era → Either (ContextError era) ScriptPurpose
 - transPlutusPurposeV3 ∷ (ConwayEraPlutusTxInfo l era, PlutusTxCert l ~ TxCert) ⇒ proxy l → ProtVer → ConwayPlutusPurpose AsIxItem era → Either (ContextError era) ScriptPurpose
 - guardConwayFeaturesForPlutusV1V2 ∷ ∀ era. (EraTx era, ConwayEraTxBody era, Inject (ConwayContextError era) (ContextError era)) ⇒ Tx era → Either (ContextError era) ()
 - transTxInInfoV3 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue, BabbageEraTxOut era) ⇒ UTxO era → TxIn → Either (ContextError era) TxInInfo
 - scriptPurposeToScriptInfo ∷ ScriptPurpose → Maybe Datum → ScriptInfo
 
Documentation
data ConwayContextError era Source #
Constructors
Instances
class EraPlutusTxInfo l era ⇒ ConwayEraPlutusTxInfo (l ∷ Language) era where Source #
A class to compute the changed parameters in the TxInfo given a ToPlutusData instance for PParamsUpdate
Methods
toPlutusChangedParameters ∷ proxy l → PParamsUpdate era → ChangedParameters Source #
Instances
| ConwayEraPlutusTxInfo 'PlutusV3 ConwayEra Source # | |
Defined in Cardano.Ledger.Conway.TxInfo Methods toPlutusChangedParameters ∷ proxy 'PlutusV3 → PParamsUpdate ConwayEra → ChangedParameters Source #  | |
transTxBodyWithdrawals ∷ EraTxBody era ⇒ TxBody era → Map Credential Lovelace Source #
Translate all Withdrawals from within a TxBody
transTxCert ∷ (ShelleyEraTxCert era, ConwayEraTxCert era, TxCert era ~ ConwayTxCert era) ⇒ ProtVer → TxCert era → TxCert Source #
In protocol 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. It has been confirmed that this buggy behavior for protocol
 version 9 has been exercised on Mainnet, therefore this conditional translation can never be
 removed for Conway era (#4863)
transTxInInfoV1 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue, BabbageEraTxOut era) ⇒ UTxO era → TxIn → 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, BabbageEraTxOut era) ⇒ TxOutSource → 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.
transValidityInterval ∷ ∀ proxy era a. Inject (AlonzoContextError era) a ⇒ proxy era → EpochInfo (Either Text) → SystemStart → ValidityInterval → Either a POSIXTimeRange Source #
Translate a validity interval to POSIX time
transProposal ∷ ConwayEraPlutusTxInfo l era ⇒ proxy l → ProposalProcedure era → ProposalProcedure Source #
toPlutusV3Args ∷ EraPlutusTxInfo 'PlutusV3 era ⇒ proxy 'PlutusV3 → ProtVer → TxInfo → PlutusPurpose AsIxItem era → Maybe (Data era) → Data era → Either (ContextError era) (PlutusArgs 'PlutusV3) Source #
transTxCertV1V2 ∷ (ShelleyEraTxCert era, ConwayEraTxCert era, Inject (ConwayContextError era) (ContextError era)) ⇒ TxCert era → Either (ContextError era) DCert Source #
transPlutusPurposeV1V2 ∷ ∀ l era proxy. (PlutusTxCert l ~ DCert, EraPlutusTxInfo l era, Inject (ConwayContextError era) (ContextError era), Inject (ConwayPlutusPurpose AsItem era) (PlutusPurpose AsItem era)) ⇒ proxy l → ProtVer → ConwayPlutusPurpose AsItem era → Either (ContextError era) ScriptPurpose Source #
transPlutusPurposeV3 ∷ (ConwayEraPlutusTxInfo l era, PlutusTxCert l ~ TxCert) ⇒ proxy l → ProtVer → ConwayPlutusPurpose AsIxItem era → Either (ContextError era) ScriptPurpose Source #
In Conway we have Anchors 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.
guardConwayFeaturesForPlutusV1V2 ∷ ∀ era. (EraTx era, ConwayEraTxBody era, Inject (ConwayContextError era) (ContextError era)) ⇒ Tx era → Either (ContextError era) () Source #
transTxInInfoV3 ∷ ∀ era. (Inject (BabbageContextError era) (ContextError era), Value era ~ MaryValue, BabbageEraTxOut era) ⇒ UTxO era → TxIn → Either (ContextError era) TxInInfo Source #
Given a TxIn, look it up in the UTxO. If it exists, translate it to the V3 context