Check sponsor wallet balances initially and omit the ones that are not funded #309
Description
In the case that a sponsor wallet is not funded, Airseeker still goes through the entire flow until it attempts to make a transaction, which will fail. This is very wasteful for a bring-your-own-gas kind of scenario, where most sponsor wallets will be unfunded and you don't want to make unnecessary API calls for them. The suggested solution:
Keep a
isFunded
flag for each sponsor wallet. When Airseeker encounters a "trigger" for a sponsor wallet, it first checks if it has already checked if it is funded. If it has and it was funded, continue. If it has and it wasn't funded, skip. If it hasn't, check if the sponsor wallet is funded, set the flag and proceed accordingly.
@bdrhn9 has implemented a solution that checks all sponsor wallets at the start. However, the suggested solution would also work well with staggering.
Note that this feature can/should be adapted to RRP in the single-Lambda Airnode.