Hi I’m playing with pyteal and I’m doing:
Asser(Gtxn[1].receiver() == Gtxn[1].sender())
The group is this:
txns = [PaymentTxn(address,params,app.escrow,amount), AssetOptInTxn(address,params,asa_id), ApplicationNoOpTxn(address, params, app.id)]
Why Is it failing in the optin transaction which has the same reciever and sender?
Gtxn[1].receiver()
is only to be used for receiver of payment transactions.
You need Gtxn[1].asset_receiver()
: Transaction Fields and Global Parameters — PyTeal documentation
Thanks, forgot about this, sorry, still learning