What I do?.
- Download logs and collect address
- Use address to getBalance
- Result make a hodler table
Result
- Too much generate request to infura
Question Is any function/method to make a one request?
Snippet
logs, err := app.CallLogs(context.Background())
for _, vLog := range logs {
go func(log types.Log) {
....
ether := GetUserBalance(app.instance, transferEvent.To.String()) // Generate TOO much request
if err := hodler.InsertOrUpdate(ctx, client, transferEvent.To.String(), ether); err != nil {
logger.Error(err)
}
}
}(vLog)
}