How does valuePaidTo work ? Does it give the value paid by the script to the pubkeyhash or is it the total value of the pubkeyhash for the pending transactions ? Consider the following TxOut
txOutputs = [
TxOut {
txOutAddress = Address {
addressCredential = PubKeyCredential "80a4f45b56b88d1139da23bc4c3c75ec6d32943c087f250b86193ca7",
addressStakingCredential = Nothing
},
txOutValue = Value (Map [
(,Map [("",87950820)])
]),
txOutDatumHash = Nothing
},
TxOut {
txOutAddress = Address {
addressCredential =
ScriptCredential "d909e024ee4ed177cee1ec2b93de9afcf1ca1cb082f3af67ffa6a6e0",
addressStakingCredential = Nothing
},
txOutValue = Value (Map [(,Map [("",2000000)]),
(64636464636161,Map [("T1",1)])]),
txOutDatumHash = Just 5b3b53a06a4c34209a6278e9c89b570e9bf76e1e040cd528a7f1bf4ce3535742
},
TxOut {
txOutAddress = Address {
addressCredential = PubKeyCredential "80a4f45b56b88d1139da23bc4c3c75ec6d32943c087f250b86193ca7",
addressStakingCredential = Nothing
},
txOutValue = Value (Map [(,Map [("",20000000)])]),
txOutDatumHash = Nothing
}
],
In this case the script is paying 20_000_000
to the pubkeyhash 80a4f45b56b88d1139da23bc4c3c75ec6d32943c087f250b86193ca7
Will valuePaidTo
output 20_000_000
or 107_950_820
?