Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 2b950d9

Browse files
PLT-494: PlutusV2 TypedValidators (#666)
* Move common code to Plutus.Script.Utils.Typed * Enable V2 TypedValidators * Enable and fix reference output tests
1 parent ed8ff2c commit 2b950d9

File tree

36 files changed

+215
-278
lines changed

36 files changed

+215
-278
lines changed

doc/plutus/tutorials/EscrowImpl.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ pay inst escrow vl = do
270270
pk <- ownFirstPaymentPubKeyHash
271271
let tx = Constraints.mustPayToTheScript pk vl
272272
<> Constraints.mustValidateIn (Ledger.interval 1 (escrowDeadline escrow))
273-
utx <- mkTxConstraints (Constraints.plutusV1TypedValidatorLookups inst) tx >>= adjustUnbalancedTx
273+
utx <- mkTxConstraints (Constraints.typedValidatorLookups inst) tx >>= adjustUnbalancedTx
274274
getCardanoTxId <$> submitUnbalancedTx utx
275275

276276
newtype RedeemSuccess = RedeemSuccess TxId
@@ -311,7 +311,7 @@ redeem inst escrow = mapError (review _EscrowError) $ do
311311
else if foldMap (view Tx.ciTxOutValue) unspentOutputs `lt` targetTotal escrow
312312
then throwing _RedeemFailed NotEnoughFundsAtAddress
313313
else do
314-
utx <- mkTxConstraints ( Constraints.plutusV1TypedValidatorLookups inst
314+
utx <- mkTxConstraints ( Constraints.typedValidatorLookups inst
315315
<> Constraints.unspentOutputs unspentOutputs
316316
) tx >>= adjustUnbalancedTx
317317
RedeemSuccess . getCardanoTxId <$> submitUnbalancedTx utx
@@ -343,7 +343,7 @@ refund inst escrow = do
343343
<> Constraints.mustValidateIn (from (Haskell.succ $ escrowDeadline escrow))
344344
if Constraints.modifiesUtxoSet tx'
345345
then do
346-
utx <- mkTxConstraints ( Constraints.plutusV1TypedValidatorLookups inst
346+
utx <- mkTxConstraints ( Constraints.typedValidatorLookups inst
347347
<> Constraints.unspentOutputs unspentOutputs
348348
) tx' >>= adjustUnbalancedTx
349349
RefundSuccess . getCardanoTxId <$> submitUnbalancedTx utx

plutus-contract/src/Plutus/Contract/Request.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ submitTxConstraints
884884
=> TypedValidator a
885885
-> TxConstraints (RedeemerType a) (DatumType a)
886886
-> Contract w s e CardanoTx
887-
submitTxConstraints inst = submitTxConstraintsWith (Constraints.plutusV1TypedValidatorLookups inst)
887+
submitTxConstraints inst = submitTxConstraintsWith (Constraints.typedValidatorLookups inst)
888888

889889
-- | Build a transaction that satisfies the constraints using the UTXO map
890890
-- to resolve any input constraints (see 'Ledger.Constraints.TxConstraints.InputConstraint')
@@ -900,7 +900,7 @@ submitTxConstraintsSpending
900900
-> TxConstraints (RedeemerType a) (DatumType a)
901901
-> Contract w s e CardanoTx
902902
submitTxConstraintsSpending inst utxo =
903-
let lookups = Constraints.plutusV1TypedValidatorLookups inst <> Constraints.unspentOutputs utxo
903+
let lookups = Constraints.typedValidatorLookups inst <> Constraints.unspentOutputs utxo
904904
in submitTxConstraintsWith lookups
905905

906906
{-| A variant of 'mkTx' that runs in the 'Contract' monad, throwing errors and

plutus-contract/src/Plutus/Contract/StateMachine.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ runInitialiseWith customLookups customConstraints StateMachineClient{scInstance}
440440
ttConstraints ThreadToken{ttOutRef} =
441441
mustMintValueWithRedeemer red (SM.threadTokenValueOrZero scInstance)
442442
<> mustSpendPubKeyOutput ttOutRef
443-
lookups = Constraints.plutusV1TypedValidatorLookups typedValidator
443+
lookups = Constraints.typedValidatorLookups typedValidator
444444
<> foldMap (plutusV1MintingPolicy . curPolicy . ttOutRef) (smThreadToken stateMachine)
445445
<> Constraints.unspentOutputs utxo
446446
<> customLookups
@@ -538,7 +538,7 @@ mkStep client@StateMachineClient{scInstance} input = do
538538
Just (newConstraints, newState) ->
539539
let isFinal = smFinal stateMachine (stateData newState)
540540
lookups =
541-
Constraints.plutusV1TypedValidatorLookups typedValidator
541+
Constraints.typedValidatorLookups typedValidator
542542
<> Constraints.unspentOutputs utxo
543543
<> if isFinal then foldMap (plutusV1MintingPolicy . curPolicy . ttOutRef) (smThreadToken stateMachine) else mempty
544544
red = Ledger.Redeemer (PlutusTx.toBuiltinData (Scripts.validatorHash typedValidator, Burn))

plutus-contract/test/Spec/Contract/TxConstraints.hs

+4-6
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ import Plutus.Contract as Con
3838
import Plutus.Contract.Test (TracePredicate, assertValidatedTransactionCount, assertValidatedTransactionCountOfTotal,
3939
checkPredicate, checkPredicateOptions, defaultCheckOptions, minLogLevel, valueAtAddress,
4040
w1, walletFundsChange, (.&&.))
41+
import Plutus.Script.Utils.Typed (Any)
4142
import Plutus.Script.Utils.V1.Address qualified as PV1
4243
import Plutus.Script.Utils.V1.Typed.Scripts qualified as PV1
43-
import Plutus.Script.Utils.V1.Typed.TypeUtils (Any)
4444
import Plutus.Script.Utils.V2.Address qualified as PV2
4545
import Plutus.Script.Utils.V2.Typed.Scripts qualified as PV2
4646
import Plutus.Trace.Emulator (ContractInstanceTag, EmulatorTrace, activateContract)
@@ -62,10 +62,8 @@ tag :: ContractInstanceTag
6262
tag = "instance 1"
6363

6464
tests :: TestTree
65-
tests = testGroup "contract tx constraints" []
65+
tests = testGroup "contract tx constraints"
6666

67-
disabledTests :: TestTree
68-
disabledTests = testGroup "contract tx constraints"
6967
-- Testing package plutus-ledger-constraints
7068

7169
[ checkPredicate "mustReferenceOutput returns False on-chain when used for unlocking funds in a PlutusV1 script"
@@ -86,10 +84,10 @@ disabledTests = testGroup "contract tx constraints"
8684

8785
-- Testing package plutus-tx-constraints
8886

89-
, checkPredicate "Tx.Constraints.mustReferenceOutput returns False on-chain when used for unlocking funds in a PlutusV1 script"
87+
, checkPredicate "Tx.Constraints.mustReferenceOutput fails when trying to unlock funds in a PlutusV1 script"
9088
(walletFundsChange w1 (Ada.adaValueOf (-5))
9189
.&&. valueAtAddress mustReferenceOutputV1ValidatorAddress (== Ada.adaValueOf 5)
92-
.&&. assertValidatedTransactionCountOfTotal 1 2
90+
.&&. assertValidatedTransactionCountOfTotal 1 1
9391
) $ do
9492
void $ activateContract w1 mustReferenceOutputTxV1ConTest tag
9593
void $ Trace.waitNSlots 2

plutus-contract/test/Spec/TxConstraints/MustSpendAtLeast.hs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Test.Tasty (TestTree, testGroup)
1313

1414
import Ledger qualified
1515
import Ledger.Ada qualified as Ada
16-
import Ledger.Constraints.OffChain qualified as Constraints (ownPaymentPubKeyHash, plutusV1TypedValidatorLookups,
16+
import Ledger.Constraints.OffChain qualified as Constraints (ownPaymentPubKeyHash, typedValidatorLookups,
1717
unspentOutputs)
1818
import Ledger.Constraints.OnChain.V1 qualified as Constraints (checkScriptContext)
1919
import Ledger.Constraints.TxConstraints qualified as Constraints (collectFromTheScript, mustIncludeDatum,
@@ -45,13 +45,13 @@ scriptBalance = 25_000_000
4545

4646
mustSpendAtLeastContract :: Integer -> Integer -> Ledger.PaymentPubKeyHash-> Contract () Empty ContractError ()
4747
mustSpendAtLeastContract offAmt onAmt pkh = do
48-
let lookups1 = Constraints.plutusV1TypedValidatorLookups typedValidator
48+
let lookups1 = Constraints.typedValidatorLookups typedValidator
4949
tx1 = Constraints.mustPayToTheScript onAmt (Ada.lovelaceValueOf scriptBalance)
5050
ledgerTx1 <- submitTxConstraintsWith lookups1 tx1
5151
awaitTxConfirmed $ Tx.getCardanoTxId ledgerTx1
5252

5353
utxos <- utxosAt scrAddress
54-
let lookups2 = Constraints.plutusV1TypedValidatorLookups typedValidator
54+
let lookups2 = Constraints.typedValidatorLookups typedValidator
5555
<> Constraints.unspentOutputs utxos
5656
<> Constraints.ownPaymentPubKeyHash pkh
5757
tx2 =

plutus-contract/test/Spec/TxConstraints/RequiredSigner.hs

+5-6
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import Data.String (fromString)
1717
import Ledger qualified
1818
import Ledger.Ada qualified as Ada
1919
import Ledger.CardanoWallet as CW
20-
import Ledger.Constraints.OffChain qualified as Constraints (paymentPubKey, plutusV1TypedValidatorLookups,
21-
unspentOutputs)
20+
import Ledger.Constraints.OffChain qualified as Constraints (paymentPubKey, typedValidatorLookups, unspentOutputs)
2221
import Ledger.Constraints.OnChain.V1 qualified as Constraints
2322
import Ledger.Constraints.TxConstraints qualified as Constraints (collectFromTheScript, mustBeSignedBy,
2423
mustIncludeDatum, mustPayToTheScript,
@@ -47,14 +46,14 @@ tests =
4746

4847
mustBeSignedByContract :: Ledger.PaymentPubKey -> Ledger.PaymentPubKeyHash -> Contract () Empty ContractError ()
4948
mustBeSignedByContract pk pkh = do
50-
let lookups1 = Constraints.plutusV1TypedValidatorLookups mustBeSignedByTypedValidator
49+
let lookups1 = Constraints.typedValidatorLookups mustBeSignedByTypedValidator
5150
tx1 = Constraints.mustPayToTheScript () (Ada.lovelaceValueOf 25_000_000)
5251
ledgerTx1 <- submitTxConstraintsWith lookups1 tx1
5352
awaitTxConfirmed $ Tx.getCardanoTxId ledgerTx1
5453

5554
utxos <- utxosAt (Ledger.scriptHashAddress $ Scripts.validatorHash mustBeSignedByTypedValidator)
5655
let lookups2 =
57-
Constraints.plutusV1TypedValidatorLookups mustBeSignedByTypedValidator
56+
Constraints.typedValidatorLookups mustBeSignedByTypedValidator
5857
<> Constraints.unspentOutputs utxos
5958
<> Constraints.paymentPubKey pk
6059
tx2 =
@@ -67,14 +66,14 @@ mustBeSignedByContract pk pkh = do
6766

6867
withoutOffChainMustBeSignedByContract :: Ledger.PaymentPubKey -> Ledger.PaymentPubKeyHash -> Contract () Empty ContractError ()
6968
withoutOffChainMustBeSignedByContract pk pkh = do
70-
let lookups1 = Constraints.plutusV1TypedValidatorLookups mustBeSignedByTypedValidator
69+
let lookups1 = Constraints.typedValidatorLookups mustBeSignedByTypedValidator
7170
tx1 = Constraints.mustPayToTheScript () (Ada.lovelaceValueOf 25_000_000)
7271
ledgerTx1 <- submitTxConstraintsWith lookups1 tx1
7372
awaitTxConfirmed $ Tx.getCardanoTxId ledgerTx1
7473

7574
utxos <- utxosAt (Ledger.scriptHashAddress $ Scripts.validatorHash mustBeSignedByTypedValidator)
7675
let lookups2 =
77-
Constraints.plutusV1TypedValidatorLookups mustBeSignedByTypedValidator
76+
Constraints.typedValidatorLookups mustBeSignedByTypedValidator
7877
<> Constraints.unspentOutputs utxos
7978
<> Constraints.paymentPubKey pk
8079
tx2 =

plutus-contract/test/Spec/TxConstraints/TimeValidity.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ contract :: Contract () Empty ContractError ()
4444
contract = do
4545
now <- Con.currentTime
4646
logInfo @String $ "now: " ++ show now
47-
let lookups1 = Constraints.plutusV1TypedValidatorLookups $ typedValidator deadline
47+
let lookups1 = Constraints.typedValidatorLookups $ typedValidator deadline
4848
tx1 = Constraints.mustPayToTheScript () (Ada.lovelaceValueOf 25000000)
4949
ledgerTx1 <- submitTxConstraintsWith lookups1 tx1
5050
awaitTxConfirmed $ Tx.getCardanoTxId ledgerTx1

plutus-ledger-constraints/src/Ledger/Constraints.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module Ledger.Constraints(
5050
, OC.mkSomeTx
5151
-- ** Lookups
5252
, OC.ScriptLookups(..)
53-
, OC.plutusV1TypedValidatorLookups
53+
, OC.typedValidatorLookups
5454
, OC.unspentOutputs
5555
, OC.plutusV1MintingPolicy
5656
, OC.plutusV2MintingPolicy

plutus-ledger-constraints/src/Ledger/Constraints/OffChain.hs

+26-29
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
module Ledger.Constraints.OffChain(
2020
-- * Lookups
2121
ScriptLookups(..)
22-
, plutusV1TypedValidatorLookups
22+
, typedValidatorLookups
2323
, generalise
2424
, unspentOutputs
2525
, plutusV1MintingPolicy
@@ -104,7 +104,6 @@ import Ledger.Tx qualified as Tx
104104
import Ledger.Tx.CardanoAPI qualified as C
105105
import Ledger.Typed.Scripts (Any, ConnectionError (UnknownRef), TypedValidator,
106106
ValidatorTypes (DatumType, RedeemerType))
107-
import Ledger.Typed.Scripts qualified as Scripts
108107
import Ledger.Typed.Scripts qualified as Typed
109108
import Ledger.Validation (evaluateMinLovelaceOutput, fromPlutusTxOutUnsafe)
110109
import Plutus.Script.Utils.Scripts qualified as P
@@ -120,29 +119,29 @@ import PlutusTx.Numeric qualified as N
120119

121120
data ScriptLookups a =
122121
ScriptLookups
123-
{ slMPS :: Map MintingPolicyHash MintingPolicy
122+
{ slMPS :: Map MintingPolicyHash MintingPolicy
124123
-- ^ Minting policies that the script interacts with
125-
, slTxOutputs :: Map TxOutRef ChainIndexTxOut
124+
, slTxOutputs :: Map TxOutRef ChainIndexTxOut
126125
-- ^ Unspent outputs that the script may want to spend
127-
, slOtherScripts :: Map ValidatorHash (Validator, Language)
126+
, slOtherScripts :: Map ValidatorHash (Validator, Language)
128127
-- ^ Validators of scripts other than "our script"
129-
, slOtherData :: Map DatumHash Datum
128+
, slOtherData :: Map DatumHash Datum
130129
-- ^ Datums that we might need
131-
, slPaymentPubKeyHashes :: Set PaymentPubKeyHash
130+
, slPaymentPubKeyHashes :: Set PaymentPubKeyHash
132131
-- ^ Public keys that we might need
133-
, slTypedPlutusV1Validator :: Maybe (TypedValidator a)
132+
, slTypedValidator :: Maybe (TypedValidator a)
134133
-- ^ The script instance with the typed validator hash & actual compiled program
135-
, slOwnPaymentPubKeyHash :: Maybe PaymentPubKeyHash
134+
, slOwnPaymentPubKeyHash :: Maybe PaymentPubKeyHash
136135
-- ^ The contract's payment public key hash, used for depositing tokens etc.
137-
, slOwnStakePubKeyHash :: Maybe StakePubKeyHash
136+
, slOwnStakePubKeyHash :: Maybe StakePubKeyHash
138137
-- ^ The contract's stake public key hash (optional)
139138
} deriving stock (Show, Generic)
140139
deriving anyclass (ToJSON, FromJSON)
141140

142141
generalise :: ScriptLookups a -> ScriptLookups Any
143142
generalise sl =
144-
let validator = fmap Scripts.generalise (slTypedPlutusV1Validator sl)
145-
in sl{slTypedPlutusV1Validator = validator}
143+
let validator = fmap Typed.generalise (slTypedValidator sl)
144+
in sl{slTypedValidator = validator}
146145

147146
instance Semigroup (ScriptLookups a) where
148147
l <> r =
@@ -153,7 +152,7 @@ instance Semigroup (ScriptLookups a) where
153152
, slOtherData = slOtherData l <> slOtherData r
154153
, slPaymentPubKeyHashes = slPaymentPubKeyHashes l <> slPaymentPubKeyHashes r
155154
-- 'First' to match the semigroup instance of Map (left-biased)
156-
, slTypedPlutusV1Validator = fmap getFirst $ (First <$> slTypedPlutusV1Validator l) <> (First <$> slTypedPlutusV1Validator r)
155+
, slTypedValidator = fmap getFirst $ (First <$> slTypedValidator l) <> (First <$> slTypedValidator r)
157156
, slOwnPaymentPubKeyHash =
158157
fmap getFirst $ (First <$> slOwnPaymentPubKeyHash l)
159158
<> (First <$> slOwnPaymentPubKeyHash r)
@@ -173,14 +172,14 @@ instance Monoid (ScriptLookups a) where
173172
-- If called multiple times, only the first typed validator is kept:
174173
--
175174
-- @
176-
-- plutusV1TypedValidatorLookups tv1 <> plutusV1TypedValidatorLookups tv2 <> ...
177-
-- == plutusV1TypedValidatorLookups tv1
175+
-- typedValidatorLookups tv1 <> typedValidatorLookups tv2 <> ...
176+
-- == typedValidatorLookups tv1
178177
-- @
179-
plutusV1TypedValidatorLookups :: TypedValidator a -> ScriptLookups a
180-
plutusV1TypedValidatorLookups inst =
178+
typedValidatorLookups :: TypedValidator a -> ScriptLookups a
179+
typedValidatorLookups inst =
181180
mempty
182-
{ slMPS = Map.singleton (Scripts.forwardingMintingPolicyHash inst) (Scripts.forwardingMintingPolicy inst)
183-
, slTypedPlutusV1Validator = Just inst
181+
{ slMPS = Map.singleton (Typed.forwardingMintingPolicyHash inst) (Typed.forwardingMintingPolicy inst)
182+
, slTypedValidator = Just inst
184183
}
185184

186185
-- | A script lookups value that uses the map of unspent outputs to resolve
@@ -518,8 +517,8 @@ addOwnInput
518517
=> ScriptInputConstraint (RedeemerType a)
519518
-> m ()
520519
addOwnInput ScriptInputConstraint{icRedeemer, icTxOutRef} = do
521-
ScriptLookups{slTxOutputs, slTypedPlutusV1Validator} <- ask
522-
inst <- maybe (throwError TypedValidatorMissing) pure slTypedPlutusV1Validator
520+
ScriptLookups{slTxOutputs, slTypedValidator} <- ask
521+
inst <- maybe (throwError TypedValidatorMissing) pure slTypedValidator
523522
typedOutRef <-
524523
either (throwError . TypeCheckFailed) pure
525524
$ runExcept @Typed.ConnectionError
@@ -529,8 +528,7 @@ addOwnInput ScriptInputConstraint{icRedeemer, icTxOutRef} = do
529528
datum <- ciTxOut ^? Tx.ciTxOutScriptDatum . _2 . _Just
530529
pure (Tx.toTxOut ciTxOut, datum)
531530
Typed.typeScriptTxOutRef inst icTxOutRef txOut datum
532-
-- TODO Needs to work with PlutusV1 AND PlutusV2.
533-
let txIn = Scripts.makeTypedScriptTxIn PlutusV1 inst icRedeemer typedOutRef
531+
let txIn = Typed.makeTypedScriptTxIn inst icRedeemer typedOutRef
534532
vl = Tx.txOutValue $ Typed.tyTxOutTxOut $ Typed.tyTxOutRefOut typedOutRef
535533
unbalancedTx . tx . Tx.inputs %= (Typed.tyTxInTxIn txIn :)
536534
valueSpentInputs <>= provided vl
@@ -546,8 +544,8 @@ addOwnOutput
546544
=> ScriptOutputConstraint (DatumType a)
547545
-> m ()
548546
addOwnOutput ScriptOutputConstraint{ocDatum, ocValue} = do
549-
ScriptLookups{slTypedPlutusV1Validator} <- ask
550-
inst <- maybe (throwError TypedValidatorMissing) pure slTypedPlutusV1Validator
547+
ScriptLookups{slTypedValidator} <- ask
548+
inst <- maybe (throwError TypedValidatorMissing) pure slTypedValidator
551549
let txOut = Typed.makeTypedScriptTxOut inst ocDatum ocValue
552550
dsV = Datum (toBuiltinData ocDatum)
553551
unbalancedTx . tx . Tx.outputs %= (Typed.tyTxOutTxOut txOut :)
@@ -752,13 +750,12 @@ resolveScriptTxOut
752750
=> ChainIndexTxOut -> m (Maybe ((ValidatorHash, Validator, Language), (DatumHash, Datum), Value))
753751
resolveScriptTxOut
754752
Tx.ScriptChainIndexTxOut
755-
{ Tx._ciTxOutValidator = (vh, v)
753+
{ Tx._ciTxOutValidator = (vh, _)
756754
, Tx._ciTxOutScriptDatum = (dh, d)
757755
, Tx._ciTxOutValue
758756
} = do
759-
-- first check in the 'ChainIndexTx' for the validator, then
760-
-- look for it in the 'slOtherScripts map.
761-
(validator, pv) <- maybe (lookupValidator vh) (pure . (, PlutusV1)) v
757+
-- Look for the validator in the 'slOtherScripts map so we also get the language.
758+
(validator, pv) <- lookupValidator vh
762759

763760
-- first check in the 'ChainIndexTxOut' for the datum, then
764761
-- look for it in the 'slOtherData' map.

plutus-ledger-constraints/src/Ledger/Constraints/TxConstraints.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ mustIncludeDatum = singleton . MustIncludeDatum
300300
-- output with @d@ and @v@ and adds @d@ in the transaction's datum witness set.
301301
-- The script address is derived from the typed validator that is provided in
302302
-- the 'Ledger.Constraints.OffChain.ScriptLookups' with
303-
-- 'Ledger.Constraints.OffChain.plutusV1TypedValidatorLookups'.
303+
-- 'Ledger.Constraints.OffChain.typedValidatorLookups'.
304304
--
305305
-- If used in 'Ledger.Constraints.OnChain', this constraint verifies that @d@ is
306306
-- part of the datum witness set and that the new script transaction output with

plutus-ledger/src/Ledger/Index.hs

+4-3
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,11 @@ mkPV1TxInInfo TxIn{txInRef} = do
455455
mkPV2TxInfo :: ValidationMonad m => Tx -> m PV2.TxInfo
456456
mkPV2TxInfo tx = do
457457
slotCfg <- pSlotConfig . vctxParams <$> ask
458-
txins <- traverse mkPV2TxInInfo $ view inputs tx
458+
txIns <- traverse mkPV2TxInInfo $ view inputs tx
459+
txRefIns <- traverse mkPV2TxInInfo $ view referenceInputs tx
459460
let ptx = PV2.TxInfo
460-
{ PV2.txInfoInputs = txins
461-
, PV2.txInfoReferenceInputs = []
461+
{ PV2.txInfoInputs = txIns
462+
, PV2.txInfoReferenceInputs = txRefIns
462463
, PV2.txInfoOutputs = txOutV1ToTxOutV2 <$> txOutputs tx
463464
-- See note [Mint and Fee fields must have ada symbol]
464465
, PV2.txInfoMint = Ada.lovelaceValueOf 0 <> txMint tx

0 commit comments

Comments
 (0)