Hey guys!
I’m having an error when sending multiple transactions. I’ve done it before using templates, so I’m not really sure why it isn’t working. Here is my source code:
arg1 = (0).to_bytes(8, 'big')
lsig = LogicSig(logic2, [arg1])
params.fee = 2000
txn1 = PaymentTxn(address, params, address, 1000)
params.fee = 0
txn2 = AssetTransferTxn(esc_addr, params, esc_addr, 0, asset_id, close_assets_to="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ", rekey_to="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ")
g_id = calculate_group_id([txn1, txn2])
txn1.group = g_id
txn2.group = g_id
stxn1 = txn1.sign(key)
stxn2 = LogicSigTransaction(txn2, lsig)
print(stxn2.verify())
signed_group = [stxn1, stxn2]
txid = cl.send_transactions(signed_group)
wait_for_confirmation(cl, txid)
This prints “True”, so I know that the logic for the second txn is solid. Similarly, I’ve tripled-checked the signature for the PaymentTxn is valid as well. I copied as directly from the atomic transfer example here as I could. Any suggestions?