-
Notifications
You must be signed in to change notification settings - Fork 155
/
Ledger.hs
33 lines (28 loc) · 906 Bytes
/
Ledger.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RecordWildCards #-}
module Test.Cardano.Ledger.Constrained.Conway.Ledger where
import Cardano.Ledger.Shelley.API.Types
import Constrained
import Cardano.Ledger.Conway (ConwayEra)
import Cardano.Ledger.Conway.Core
import Cardano.Ledger.Crypto (StandardCrypto)
import Test.Cardano.Ledger.Constrained.Conway.Instances
import Test.Cardano.Ledger.Constrained.Conway.Utxo
ledgerTxSpec ::
IsConwayUniv fn =>
LedgerEnv (ConwayEra StandardCrypto) ->
LedgerState (ConwayEra StandardCrypto) ->
Specification fn (Tx (ConwayEra StandardCrypto))
ledgerTxSpec env st =
constrained $ \tx ->
[ satisfies tx (utxoTxSpec utxoEnv (lsUTxOState st))
]
where
utxoEnv =
UtxoEnv
{ ueSlot = ledgerSlotNo env
, uePParams = ledgerPp env
, ueCertState = lsCertState st
}