@@ -103,7 +103,7 @@ txinsScriptHashes txInps (UTxO u) = foldr add Set.empty txInps
103103getShelleyScriptsNeeded ::
104104 EraTxBody era =>
105105 UTxO era ->
106- TxBody era ->
106+ TxBody t era ->
107107 ShelleyScriptsNeeded era
108108getShelleyScriptsNeeded u txBody =
109109 ShelleyScriptsNeeded
@@ -124,7 +124,7 @@ shelleyConsumed ::
124124 PParams era ->
125125 CertState era ->
126126 UTxO era ->
127- TxBody era ->
127+ TxBody t era ->
128128 Value era
129129shelleyConsumed pp certState =
130130 getConsumedValue
@@ -138,7 +138,7 @@ produced ::
138138 (EraUTxO era , EraCertState era ) =>
139139 PParams era ->
140140 CertState era ->
141- TxBody era ->
141+ TxBody t era ->
142142 Value era
143143produced pp certState =
144144 getProducedValue pp (flip Map. member $ certState ^. certPStateL . psStakePoolsL)
@@ -148,7 +148,7 @@ shelleyProducedValue ::
148148 PParams era ->
149149 -- | Check whether a pool with a supplied PoolStakeId is already registered.
150150 (KeyHash 'StakePool -> Bool ) ->
151- TxBody era ->
151+ TxBody FullTx era ->
152152 Value era
153153shelleyProducedValue pp isRegPoolId txBody =
154154 sumAllValue (txBody ^. outputsTxBodyL)
@@ -162,7 +162,7 @@ getConsumedCoin ::
162162 PParams era ->
163163 (Credential 'Staking -> Maybe Coin ) ->
164164 UTxO era ->
165- TxBody era ->
165+ TxBody t era ->
166166 Coin
167167getConsumedCoin pp lookupRefund utxo txBody =
168168 {- balance (txins tx ◁ u) + wbalance (txwdrls tx) + keyRefunds dpstate tx -}
@@ -191,25 +191,28 @@ instance EraUTxO ShelleyEra where
191191
192192 getScriptsHashesNeeded (ShelleyScriptsNeeded scriptsHashes) = scriptsHashes
193193
194- getWitsVKeyNeeded = getShelleyWitsVKeyNeeded
194+ getWitsVKeyNeeded certState utxo = getShelleyWitsVKeyNeeded certState utxo
195195
196196 getMinFeeTxUtxo pp tx _ = getShelleyMinFeeTxUtxo pp tx
197197
198198-- We don't consider the reference scripts in the calculation before Conway
199- getShelleyMinFeeTxUtxo :: EraTx era => PParams era -> Tx era -> Coin
199+ getShelleyMinFeeTxUtxo :: EraTx era => PParams era -> Tx t era -> Coin
200200getShelleyMinFeeTxUtxo pparams tx = getMinFeeTx pparams tx 0
201201
202202-- | Collect the set of hashes of keys that needs to sign a
203203-- given transaction. This set consists of the txin owners,
204204-- certificate authors, and withdrawal reward accounts.
205205witsVKeyNeededGenDelegs ::
206- forall era .
206+ forall era t .
207207 ShelleyEraTxBody era =>
208- TxBody era ->
208+ TxBody FullTx era ->
209209 GenDelegs ->
210210 Set (KeyHash 'Witness)
211211witsVKeyNeededGenDelegs txBody (GenDelegs genDelegs) =
212- asWitness `Set.map` proposedUpdatesWitnesses (txBody ^. updateTxBodyL)
212+ withTxType
213+ txBody
214+ (\ fullTxBody -> asWitness `Set.map` proposedUpdatesWitnesses (fullTxBody ^. updateTxBodyL))
215+ (const mempty )
213216 where
214217 -- Calculate the set of hash keys of the required witnesses for update
215218 -- proposals.
@@ -224,10 +227,10 @@ witsVKeyNeededGenDelegs txBody (GenDelegs genDelegs) =
224227-- | Extract witnesses from UTxO and TxBody. Does not enforce witnesses for governance
225228-- related Keys, i.e. `GenDelegs`
226229getShelleyWitsVKeyNeededNoGov ::
227- forall era .
230+ forall era t .
228231 EraTx era =>
229232 UTxO era ->
230- TxBody era ->
233+ TxBody t era ->
231234 Set (KeyHash 'Witness)
232235getShelleyWitsVKeyNeededNoGov utxo' txBody =
233236 certAuthors
@@ -276,7 +279,7 @@ getShelleyWitsVKeyNeeded ::
276279 (EraTx era , ShelleyEraTxBody era , EraCertState era ) =>
277280 CertState era ->
278281 UTxO era ->
279- TxBody era ->
282+ TxBody FullTx era ->
280283 Set (KeyHash 'Witness)
281284getShelleyWitsVKeyNeeded certState utxo txBody =
282285 getShelleyWitsVKeyNeededNoGov utxo txBody
0 commit comments