Why have both txn.sender() and txn.asset_sender() in PyTEAL?

They are different. The Sender is the sender of the transaction and, often, the account the assets will come from. But not for clawback. In a clawback transaction, AssetSender, is set (normally it’s zero). The Sender is the account with clawback authority. But the assets move from AssetSender to AssetReceiver.

2 Likes