In Week 6 of PP Lars finds an oracle input with the following code:
oracleInput :: TxOut
oracleInput =
let
ins = [ o
| i <- txInfoInputs info
, let o = txInInfoResolved i
-- addr = oracle's address
, txOutAddress o == addr
]
in
case ins of
[o] -> o
_ -> traceError "expected exactly one oracle input"
Does it imply that if a script creates a transaction then transaction outputs will reference the script address through txOutAddress
field?
Thank you :)