I have written a script that will fail unless it receives both oref1
and oref2
as reference inputs. I have the following emulator code:
let rule = mempty
<> C.mustReferenceOutput oref1
<> C.mustReferenceOutput oref2
<> C.mustMintValue val
<> (C.mustBeSignedBy ppkh)
tx <- mkTxConstraints @Void (plutusV2MintingPolicy policy) rule
submitTxConfirmed tx
The script fails saying that oref1
is not a reference input. But if I comment out C.mustReferenceOutput oref2
then the script fails saying it has not received oref2
as a reference input. It seems I can attach oref1
or oref2
as a reference input, but not both.
On the testnet, this issue does not occur, so it isn't a problem with the script. Is it not possible with the Plutus emulator to attach more than one reference input to a transaction?