I am currently trying to develop a large-scale Asa creation Smart Contract.
concerning the steps:
Opt-in for the Assets by the caller
Transfer to the caller
The asset creation meets the criteria large-scale (had some trouble, but with some help from Nullun, it works).
Opt-in & Transfer
So I have approx. 240 Assets in the application account must be transferred to the caller. For simplicity, the caller is the global.creator address and the clawback is set to it as well on Asa creation, so the transfer can be a clawback.
However, two problems arise; firstly, how do I Opt-in to multiple assets via Innertransactions in Pyteal?
I know I could just do a grouped transaction of 16 Opt-in Transactions via goal, but it should be possible via Pyteal/teal as well, or would I be limited by the max app arg on app call? If so, as the Asas are created in batches, so the ids are continuous, could I just define a custom logic with a start and end?
Secondly, I encounter a problem from just the single Opt-In (per Inner txn) as well, either getting an error: error: logical eval error: … (escrow address) unauthorized creator address or the classic kmd error that the key is not in the wallet.
I tried rekeying, but there is probably an understanding problem on my side as:
goal clerk send -a 0 -f creatoraddress -t creatoraddress --rekey-to appadress did not change the errors even though goal account dump shows the rekey.
Any help is appreciated