cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellNone
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 ∷ (EraAccounts era, EraPParams era, ShelleyEraTxCert era) ⇒ PParams era → [TxCert era] → Accounts era → Coin Source #

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

scriptWitsNeeded' ∷ Proof era → MUtxo era → TxBody 'TopTx 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.

txInBalance ∷ EraTxOut era ⇒ Set TxIn → MUtxo era → Coin Source #

injectFee ∷ EraTxOut era ⇒ Coin → TxOut era → TxOut era Source #

isValid' ∷ Proof era → Tx 'TopTx era → IsPhase2Valid Source #

txoutEvidence ∷ 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

getBody ∷ EraTx era ⇒ Proof era → Tx 'TopTx era → TxBody 'TopTx era Source #

getCollateralOutputs ∷ Proof era → TxBody 'TopTx era → [TxOut era] Source #

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

createRUpdNonPulsing' ∷ (EraPParams era, EraAccounts era) ⇒ Model era → RewardUpdateOld Source #

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

languagesUsed ∷ Proof era → Tx 'TopTx era → UTxO era → Set ScriptHash → Set Language Source #

languages ∷ (EraUTxO era, AlonzoEraScript era) ⇒ Tx 'TopTx era → UTxO era → Set ScriptHash → Set 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 ChainAccountState Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

TotalAda (VState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ VState era → Coin Source #

EraAccounts era ⇒ TotalAda (DState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ DState era → Coin Source #

TotalAda (PState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ PState era → Coin Source #

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

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ UTxO era → Coin Source #

TotalAda (ShelleyGovState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ ShelleyGovState era → Coin Source #

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

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ EpochState era → Coin Source #

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

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ LedgerState era → Coin Source #

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

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ NewEpochState era → Coin Source #

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

Defined in Test.Cardano.Ledger.Generic.Functions

Methods

totalAda ∷ UTxOState era → Coin Source #

EraAccounts era ⇒ TotalAda (ShelleyCertState era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Functions

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

Defined in Test.Cardano.Ledger.Generic.MockChain

Methods

totalAda ∷ MockChainState era → Coin Source #

adaPots ∷ Proof era → EpochState era → AdaPots Source #