On the plutus pioneer program, lesson 02, Lars shows the parameterized contracts and on the off-chain code he makes use of the mustPayToTheScript function to create the transaction. Different from other similar functions, this one doesn't take the hash of the script as an input. Therefore, how does it know what is the script address to use?

1 Answer 1


It doesn't need the script address in this case because later he uses:

ledgerTx <- submitTxConstraints typedValidator tx

where typedValidator is the script.

  • Why didn't you give the OP an upvote?
    – gRebel
    Jan 23, 2022 at 5:08
  • Yeah, good point. Done
    – kindofdev
    Jan 23, 2022 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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