Trying to use following smart contract TEAL code for the App to optin to an asset.
The app is called where the Sender is another account, but the idea is that (1) The App Opts in to Asset A and then directly below it (2) The Sender transfers Y amount of the asset into the App (Escrow)
txna Assets 0 … contains the correct Asset ID which incidentally was created by Sender.
Following fails even if I include the AssetAmount of 0. Some guidance appreciated on how to approach this
itxn_begin
int axfer
itxn_field TypeEnum
global CurrentApplicationAddress
itxn_field AssetSender
global CurrentApplicationAddress
itxn_field AssetReceiver
txna Assets 0
itxn_field XferAsset
itxn_submit
Error:
logic eval error: clawback not allowed: sender WCS6TVPJRBSARHLN2326LRU5BYVJZUKI2VJ53CAWKYYHDE455ZGKANWMGM, clawback W5Z6DXTBYI4R7XJDE352FGYN3QPC6EOIN3ZWG6AVGWFAYXGX2XLPT6CHVI. Details: pc=194, opcodes=txna Assets 0itxn_field XferAssetitxn_submit