2

I'm trying to understand how Constraints.modifiesUtxoSet works. Can anyone give an example?

modifiesUtxoSet :: forall i o. TxConstraints i o -> Bool

Check whether every transaction that satisfies the constraints has to modify the UTXO set. 

1 Answer 1

3

The SimpleEscrow use case uses it: https://playground.plutus.iohkdev.io/doc/haddock/plutus-use-cases/html/src/Plutus.Contracts.SimpleEscrow.html#refundEp

Another example is the Crowdfunding use case: https://playground.plutus.iohkdev.io/doc/haddock/plutus-use-cases/html/src/Plutus.Contracts.Crowdfunding.html#contribute

1
  • I've seen them and after looking at the source of modifiesUtxoSet, I'd say that the purpose of modifiesUtxoSet is something like: "check if TxConstraints" does something"
    – kindofdev
    Jan 25, 2022 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.