1

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)
    }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.