For analysis and testing functions, I’m making an attempt to create a transaction that makes use of customized or bizarre scripts on its outputs, clearly on a testing setting. To not make issues too difficult, I simply merely wish to use OP_TRUE because the script. Because of this, I assemble the output as such:
def create_outputs(params):
vouts = []
val_per_out = 0.005
...
out = {
"51": val_per_out, #I exploit "51" as deal with as a result of I noticed it is the hex illustration for OP_TRUE
}
vouts.append(out)
...
return vouts
Then, I create the transaction:
vouts = create_outputs(params)
raw_tx = rpc_connection.createrawtransaction(vins, vouts, nLockTime)
Nonetheless, when execution will get to the final line of code, it throws