cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Generic.Functions

Description

Functions in this module take a (Proof era) as their first parameter and do something potentially different in each Era.

Synopsis

Documentation

depositsAndRefunds ∷ (EraPParams era, ShelleyEraTxCert era) ⇒ PParams era → [TxCert era] → Map (Credential 'Staking) CoinCoin Source #

Positive numbers are "deposits owed", negative amounts are "refunds gained"

scriptWitsNeeded'Proof era → MUtxo era → TxBody era → Set ScriptHash Source #

Compute the set of ScriptHashes for which there should be ScriptWitnesses. In Babbage Era and later, where inline Scripts are allowed, they should not appear in this set.

scriptsNeeded'Proof era → MUtxo era → TxBody era → Set ScriptHash Source #

txInBalance ∷ ∀ era. EraTxOut era ⇒ Set TxInMUtxo era → Coin Source #

txoutFieldsProof era → TxOut era → (Addr, Value era, [TxOutField era]) Source #

Break a TxOut into its mandatory and optional parts

injectFeeEraTxOut era ⇒ Proof era → CoinTxOut era → TxOut era Source #

emptyPPUPstate ∷ ∀ era. Proof era → ShelleyGovState era Source #

isValid'Proof era → Tx era → IsValid Source #

txoutEvidence ∷ ∀ era. Proof era → TxOut era → ([Credential 'Payment], Maybe DataHash) Source #

Does the TxOut have evidence of credentials and data. Evidence of data is either ScriptHash or (in Babbage) an inline Datum Evidence of credentials can come from the Addr

getBodyEraTx era ⇒ Proof era → Tx era → TxBody era Source #

getCollateralOutputsProof era → TxBody era → [TxOut era] Source #

getInputsEraTxBody era ⇒ Proof era → TxBody era → Set TxIn Source #

getOutputsEraTxBody era ⇒ Proof era → TxBody era → StrictSeq (TxOut era) Source #

getScriptWitsEraTxWits era ⇒ Proof era → TxWits era → Map ScriptHash (Script era) Source #

allInputsEraTxBody era ⇒ Proof era → TxBody era → Set TxIn Source #

getWitnessesEraTx era ⇒ Proof era → Tx era → TxWits era Source #

alwaysTrue ∷ ∀ era. Proof era → Maybe LanguageNaturalScript era Source #

alwaysFalse ∷ ∀ era. Proof era → Maybe LanguageNaturalScript era Source #

certs ∷ (ShelleyEraTxBody era, EraTx era) ⇒ Proof era → Tx era → [TxCert era] Source #

createRUpdNonPulsing' ∷ ∀ era. Proof era → Model era → RewardUpdateOld Source #

Create an old style RewardUpdate to be used in tests, in any Era.

languagesUsed ∷ ∀ era. Proof era → Tx era → UTxO era → Set ScriptHashSet Language Source #

languages ∷ ∀ era. (EraUTxO era, AlonzoEraScript era) ⇒ Tx era → UTxO era → Set ScriptHashSet Language Source #

Compute the Set of Languages in an era, where AlonzoScripts are used

class TotalAda t where Source #

Compute the total Ada from Ada pots within t

Methods

totalAda ∷ t → Coin Source #

Instances

Instances details
TotalAda AccountState Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

TotalAda (CertState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaCertState era → Coin Source #

TotalAda (DState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaDState era → Coin Source #

TotalAda (PState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaPState era → Coin Source #

TotalAda (VState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaVState era → Coin Source #

Reflect era ⇒ TotalAda (UTxO era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaUTxO era → Coin Source #

TotalAda (ShelleyGovState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaShelleyGovState era → Coin Source #

Reflect era ⇒ TotalAda (EpochState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaEpochState era → Coin Source #

Reflect era ⇒ TotalAda (LedgerState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaLedgerState era → Coin Source #

Reflect era ⇒ TotalAda (NewEpochState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaNewEpochState era → Coin Source #

Reflect era ⇒ TotalAda (UTxOState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAdaUTxOState era → Coin Source #

Reflect era ⇒ TotalAda (MockChainState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.MockChain

Methods

totalAdaMockChainState era → Coin Source #

govStateTotalAda ∷ ∀ era. Reflect era ⇒ GovState era → Coin Source #

adaPotsProof era → EpochState era → AdaPots Source #