Hello! In pyteal, is it possibile to pass all foreign accounts to an inner tx call?
complains with the following
pyteal.TealInputError: inner transaction set array field TxnField.accounts with non-array value
You can pass it as a python list like
TxnField.accounts: [Gtxn.accounts, Gtxn.accounts,...]
And if you call it multiple times it’ll append to the list
What if the outer app call can have a different number of foreign accounts?
That static implementation you proposed would not work unfortunately.
Sure, you can iterate over the length of the outer array and sequential calls to
InnerTxnBuilder.SetField(TxnField.accounts, Gtxn.accounts[scratchVar.load()]) should append the acct to the list