Hi, I’m testing some simple smart contracts and I’m encoutering an error. I’m using pyteal to create two inner transactions in a single app call (I’ve seen that there is possible to do a maximum of 16 Inner txs).
InnerTxnBuilder.Begin(),
InnerTxnBuilder.SetFields({
TxnField.type_enum: TxnType.AssetTransfer,
TxnField.asset_amount: Int(0),
TxnField.xfer_asset: Btoi(Txn.application_args[0]),
TxnField.asset_receiver: Global.current_application_address()
}),
InnerTxnBuilder.Submit(),
InnerTxnBuilder.Begin(),
InnerTxnBuilder.SetFields({
TxnField.type_enum: TxnType.Payment,
TxnField.asset_amount: Int(200000),
TxnField.asset_receiver: Global.creator_address()
}),
InnerTxnBuilder.Submit(),
Return(Int(1))
And calling the application I’m using this tx group:
txns = [PaymentTxn(sender,params,get_application_address(index),amount),
ApplicationNoOpTxn(sender, params, index, accounts=["address"], app_args=[asa_id.to_bytes(8,'big')], foreign_assets=[asa_id])]
I’m getting the logic eval error: transaction of type pay has non-zero fields for type axfer but I’m not understading why. If I delete the payment inner tx part, It work fine. Can someone help me?