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
It doesn't need the script address in this case because later he uses:
ledgerTx <- submitTxConstraints typedValidator tx
where typedValidator is the script.