{"action":"created","comment":{"url":"https://api.github.com/repos/poanetwork/blockscout/pulls/comments/227513472","pull_request_review_id":167572942,"id":227513472,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzUxMzQ3Mg==","diff_hunk":"@@ -51,6 +59,17 @@ defmodule Indexer.TokenBalances do\n     Map.merge(token_balance, %{value: nil, value_fetched_at: nil, error: error_message})\n   end\n \n+  defp schedule_unfetched_token_balances(unfetched_token_balances) do\n+    unfetched_token_balances\n+    |> Enum.map(fn token_balance ->\n+      {:ok, address_hash} = Chain.string_to_address_hash(token_balance.address_hash)\n+      {:ok, token_hash} = Chain.string_to_address_hash(token_balance.token_contract_address_hash)\n+\n+      %{address_hash: address_hash, token_contract_address_hash: token_hash, block_number: token_balance.block_number}\n+    end)\n+    |> TokenBalance.Fetcher.async_fetch()","path":"apps/indexer/lib/indexer/token_balances.ex","position":50,"original_position":51,"commit_id":"cff47e9d0e1b8b1352af7d96b1621416160dace5","original_commit_id":"096c420d7d75eb3f37f8a95958db913ec7e9be31","user":{"login":"feliperenan","id":27698968,"node_id":"MDQ6VXNlcjI3Njk4OTY4","avatar_url":"https://avatars2.githubusercontent.com/u/27698968?v=4","gravatar_id":"","url":"https://api.github.com/users/feliperenan","html_url":"https://github.com/feliperenan","followers_url":"https://api.github.com/users/feliperenan/followers","following_url":"https://api.github.com/users/feliperenan/following{/other_user}","gists_url":"https://api.github.com/users/feliperenan/gists{/gist_id}","starred_url":"https://api.github.com/users/feliperenan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliperenan/subscriptions","organizations_url":"https://api.github.com/users/feliperenan/orgs","repos_url":"https://api.github.com/users/feliperenan/repos","events_url":"https://api.github.com/users/feliperenan/events{/privacy}","received_events_url":"https://api.github.com/users/feliperenan/received_events","type":"User","site_admin":false},"body":"It will add to `TokenBalance.Fetcher` queue to be processed at some point again. If the interaction always fails, we have to look at the logs to see why and if we want to do something, as we did with the burn address.","created_at":"2018-10-23T18:31:23Z","updated_at":"2018-10-23T18:31:24Z","html_url":"https://github.com/poanetwork/blockscout/pull/960#discussion_r227513472","pull_request_url":"https://api.github.com/repos/poanetwork/blockscout/pulls/960","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/poanetwork/blockscout/pulls/comments/227513472"},"html":{"href":"https://github.com/poanetwork/blockscout/pull/960#discussion_r227513472"},"pull_request":{"href":"https://api.github.com/repos/poanetwork/blockscout/pulls/960"}},"in_reply_to_id":227496286},"pull_request":{"url":"https://api.github.com/repos/poanetwork/blockscout/pulls/960","id":224740950,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NzQwOTUw","html_url":"https://github.com/poanetwork/blockscout/pull/960","diff_url":"https://github.com/poanetwork/blockscout/pull/960.diff","patch_url":"https://github.com/poanetwork/blockscout/pull/960.patch","issue_url":"https://api.github.com/repos/poanetwork/blockscout/issues/960","number":960,"state":"open","locked":false,"title":"Improve token balances fetcher","user":{"login":"feliperenan","id":27698968,"node_id":"MDQ6VXNlcjI3Njk4OTY4","avatar_url":"https://avatars2.githubusercontent.com/u/27698968?v=4","gravatar_id":"","url":"https://api.github.com/users/feliperenan","html_url":"https://github.com/feliperenan","followers_url":"https://api.github.com/users/feliperenan/followers","following_url":"https://api.github.com/users/feliperenan/following{/other_user}","gists_url":"https://api.github.com/users/feliperenan/gists{/gist_id}","starred_url":"https://api.github.com/users/feliperenan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliperenan/subscriptions","organizations_url":"https://api.github.com/users/feliperenan/orgs","repos_url":"https://api.github.com/users/feliperenan/repos","events_url":"https://api.github.com/users/feliperenan/events{/privacy}","received_events_url":"https://api.github.com/users/feliperenan/received_events","type":"User","site_admin":false},"body":"Resolves https://github.com/poanetwork/blockscout/issues/948\r\n## Changelog\r\n\r\n### Enhancements\r\n* Increase `batch_size` and `init_chunk_size` from `TokenBalance.Fetcher` to process `100` of token balances at time.\r\n* Ensure that token balances that gave errors interacting with smart contract are going to be fetched\r\n","created_at":"2018-10-22T16:44:25Z","updated_at":"2018-10-23T18:31:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"835b1cc7cb2c04886d25d89e07617ccaa36ee073","assignee":{"login":"feliperenan","id":27698968,"node_id":"MDQ6VXNlcjI3Njk4OTY4","avatar_url":"https://avatars2.githubusercontent.com/u/27698968?v=4","gravatar_id":"","url":"https://api.github.com/users/feliperenan","html_url":"https://github.com/feliperenan","followers_url":"https://api.github.com/users/feliperenan/followers","following_url":"https://api.github.com/users/feliperenan/following{/other_user}","gists_url":"https://api.github.com/users/feliperenan/gists{/gist_id}","starred_url":"https://api.github.com/users/feliperenan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliperenan/subscriptions","organizations_url":"https://api.github.com/users/feliperenan/orgs","repos_url":"https://api.github.com/users/feliperenan/repos","events_url":"https://api.github.com/users/feliperenan/events{/privacy}","received_events_url":"https://api.github.com/users/feliperenan/received_events","type":"User","site_admin":false},"assignees":[{"login":"feliperenan","id":27698968,"node_id":"MDQ6VXNlcjI3Njk4OTY4","avatar_url":"https://avatars2.githubusercontent.com/u/27698968?v=4","gravatar_id":"","url":"https://api.github.com/users/feliperenan","html_url":"https://github.com/feliperenan","followers_url":"https://api.github.com/users/feliperenan/followers","following_url":"https://api.github.com/users/feliperenan/following{/other_user}","gists_url":"https://api.github.com/users/feliperenan/gists{/gist_id}","starred_url":"https://api.github.com/users/feliperenan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliperenan/subscriptions","organizations_url":"https://api.github.com/users/feliperenan/orgs","repos_url":"https://api.github.com/users/feliperenan/repos","events_url":"https://api.github.com/users/feliperenan/events{/privacy}","received_events_url":"https://api.github.com/users/feliperenan/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"amandasposito","id":840531,"node_id":"MDQ6VXNlcjg0MDUzMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/840531?v=4","gravatar_id":"","url":"https://api.github.com/users/amandasposito","html_url":"https://github.com/amandasposito","followers_url":"https://api.github.com/users/amandasposito/followers","following_url":"https://api.github.com/users/amandasposito/following{/other_user}","gists_url":"https://api.github.com/users/amandasposito/gists{/gist_id}","starred_url":"https://api.github.com/users/amandasposito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amandasposito/subscriptions","organizations_url":"https://api.github.com/users/amandasposito/orgs","repos_url":"https://api.github.com/users/amandasposito/repos","events_url":"https://api.github.com/users/amandasposito/events{/privacy}","received_events_url":"https://api.github.com/users/amandasposito/received_events","type":"User","site_admin":false},{"login":"GuSilverFlame","id":18328258,"node_id":"MDQ6VXNlcjE4MzI4MjU4","avatar_url":"https://avatars1.githubusercontent.com/u/18328258?v=4","gravatar_id":"","url":"https://api.github.com/users/GuSilverFlame","html_url":"https://github.com/GuSilverFlame","followers_url":"https://api.github.com/users/GuSilverFlame/followers","following_url":"https://api.github.com/users/GuSilverFlame/following{/other_user}","gists_url":"https://api.github.com/users/GuSilverFlame/gists{/gist_id}","starred_url":"https://api.github.com/users/GuSilverFlame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuSilverFlame/subscriptions","organizations_url":"https://api.github.com/users/GuSilverFlame/orgs","repos_url":"https://api.github.com/users/GuSilverFlame/repos","events_url":"https://api.github.com/users/GuSilverFlame/events{/privacy}","received_events_url":"https://api.github.com/users/GuSilverFlame/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":859573185,"node_id":"MDU6TGFiZWw4NTk1NzMxODU=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/in%20progress","name":"in progress","color":"ededed","default":false},{"id":871581825,"node_id":"MDU6TGFiZWw4NzE1ODE4MjU=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/team:%20developer","name":"team: developer","color":"c2f8f9","default":false},{"id":935022481,"node_id":"MDU6TGFiZWw5MzUwMjI0ODE=","url":"https://api.github.com/repos/poanetwork/blockscout/labels/wip","name":"wip","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/poanetwork/blockscout/pulls/960/commits","review_comments_url":"https://api.github.com/repos/poanetwork/blockscout/pulls/960/comments","review_comment_url":"https://api.github.com/repos/poanetwork/blockscout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/poanetwork/blockscout/issues/960/comments","statuses_url":"https://api.github.com/repos/poanetwork/blockscout/statuses/cff47e9d0e1b8b1352af7d96b1621416160dace5","head":{"label":"poanetwork:frg-improve-token-balances-fetcher","ref":"frg-improve-token-balances-fetcher","sha":"cff47e9d0e1b8b1352af7d96b1621416160dace5","user":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":117294980,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcyOTQ5ODA=","name":"blockscout","full_name":"poanetwork/blockscout","private":false,"owner":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/poanetwork/blockscout","description":"A tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum networks.","fork":false,"url":"https://api.github.com/repos/poanetwork/blockscout","forks_url":"https://api.github.com/repos/poanetwork/blockscout/forks","keys_url":"https://api.github.com/repos/poanetwork/blockscout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poanetwork/blockscout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poanetwork/blockscout/teams","hooks_url":"https://api.github.com/repos/poanetwork/blockscout/hooks","issue_events_url":"https://api.github.com/repos/poanetwork/blockscout/issues/events{/number}","events_url":"https://api.github.com/repos/poanetwork/blockscout/events","assignees_url":"https://api.github.com/repos/poanetwork/blockscout/assignees{/user}","branches_url":"https://api.github.com/repos/poanetwork/blockscout/branches{/branch}","tags_url":"https://api.github.com/repos/poanetwork/blockscout/tags","blobs_url":"https://api.github.com/repos/poanetwork/blockscout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poanetwork/blockscout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poanetwork/blockscout/git/refs{/sha}","trees_url":"https://api.github.com/repos/poanetwork/blockscout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poanetwork/blockscout/statuses/{sha}","languages_url":"https://api.github.com/repos/poanetwork/blockscout/languages","stargazers_url":"https://api.github.com/repos/poanetwork/blockscout/stargazers","contributors_url":"https://api.github.com/repos/poanetwork/blockscout/contributors","subscribers_url":"https://api.github.com/repos/poanetwork/blockscout/subscribers","subscription_url":"https://api.github.com/repos/poanetwork/blockscout/subscription","commits_url":"https://api.github.com/repos/poanetwork/blockscout/commits{/sha}","git_commits_url":"https://api.github.com/repos/poanetwork/blockscout/git/commits{/sha}","comments_url":"https://api.github.com/repos/poanetwork/blockscout/comments{/number}","issue_comment_url":"https://api.github.com/repos/poanetwork/blockscout/issues/comments{/number}","contents_url":"https://api.github.com/repos/poanetwork/blockscout/contents/{+path}","compare_url":"https://api.github.com/repos/poanetwork/blockscout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poanetwork/blockscout/merges","archive_url":"https://api.github.com/repos/poanetwork/blockscout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poanetwork/blockscout/downloads","issues_url":"https://api.github.com/repos/poanetwork/blockscout/issues{/number}","pulls_url":"https://api.github.com/repos/poanetwork/blockscout/pulls{/number}","milestones_url":"https://api.github.com/repos/poanetwork/blockscout/milestones{/number}","notifications_url":"https://api.github.com/repos/poanetwork/blockscout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poanetwork/blockscout/labels{/name}","releases_url":"https://api.github.com/repos/poanetwork/blockscout/releases{/id}","deployments_url":"https://api.github.com/repos/poanetwork/blockscout/deployments","created_at":"2018-01-12T22:45:24Z","updated_at":"2018-10-23T17:55:38Z","pushed_at":"2018-10-23T18:27:44Z","git_url":"git://github.com/poanetwork/blockscout.git","ssh_url":"git@github.com:poanetwork/blockscout.git","clone_url":"https://github.com/poanetwork/blockscout.git","svn_url":"https://github.com/poanetwork/blockscout","homepage":"https://blockscout.com","size":8115,"stargazers_count":250,"watchers_count":250,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"archived":false,"open_issues_count":153,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":76,"open_issues":153,"watchers":250,"default_branch":"master"}},"base":{"label":"poanetwork:master","ref":"master","sha":"3a077592edb4da6e0afb275197fe10fe75c909ea","user":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":117294980,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcyOTQ5ODA=","name":"blockscout","full_name":"poanetwork/blockscout","private":false,"owner":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/poanetwork/blockscout","description":"A tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum networks.","fork":false,"url":"https://api.github.com/repos/poanetwork/blockscout","forks_url":"https://api.github.com/repos/poanetwork/blockscout/forks","keys_url":"https://api.github.com/repos/poanetwork/blockscout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poanetwork/blockscout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poanetwork/blockscout/teams","hooks_url":"https://api.github.com/repos/poanetwork/blockscout/hooks","issue_events_url":"https://api.github.com/repos/poanetwork/blockscout/issues/events{/number}","events_url":"https://api.github.com/repos/poanetwork/blockscout/events","assignees_url":"https://api.github.com/repos/poanetwork/blockscout/assignees{/user}","branches_url":"https://api.github.com/repos/poanetwork/blockscout/branches{/branch}","tags_url":"https://api.github.com/repos/poanetwork/blockscout/tags","blobs_url":"https://api.github.com/repos/poanetwork/blockscout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poanetwork/blockscout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poanetwork/blockscout/git/refs{/sha}","trees_url":"https://api.github.com/repos/poanetwork/blockscout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poanetwork/blockscout/statuses/{sha}","languages_url":"https://api.github.com/repos/poanetwork/blockscout/languages","stargazers_url":"https://api.github.com/repos/poanetwork/blockscout/stargazers","contributors_url":"https://api.github.com/repos/poanetwork/blockscout/contributors","subscribers_url":"https://api.github.com/repos/poanetwork/blockscout/subscribers","subscription_url":"https://api.github.com/repos/poanetwork/blockscout/subscription","commits_url":"https://api.github.com/repos/poanetwork/blockscout/commits{/sha}","git_commits_url":"https://api.github.com/repos/poanetwork/blockscout/git/commits{/sha}","comments_url":"https://api.github.com/repos/poanetwork/blockscout/comments{/number}","issue_comment_url":"https://api.github.com/repos/poanetwork/blockscout/issues/comments{/number}","contents_url":"https://api.github.com/repos/poanetwork/blockscout/contents/{+path}","compare_url":"https://api.github.com/repos/poanetwork/blockscout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poanetwork/blockscout/merges","archive_url":"https://api.github.com/repos/poanetwork/blockscout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poanetwork/blockscout/downloads","issues_url":"https://api.github.com/repos/poanetwork/blockscout/issues{/number}","pulls_url":"https://api.github.com/repos/poanetwork/blockscout/pulls{/number}","milestones_url":"https://api.github.com/repos/poanetwork/blockscout/milestones{/number}","notifications_url":"https://api.github.com/repos/poanetwork/blockscout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poanetwork/blockscout/labels{/name}","releases_url":"https://api.github.com/repos/poanetwork/blockscout/releases{/id}","deployments_url":"https://api.github.com/repos/poanetwork/blockscout/deployments","created_at":"2018-01-12T22:45:24Z","updated_at":"2018-10-23T17:55:38Z","pushed_at":"2018-10-23T18:27:44Z","git_url":"git://github.com/poanetwork/blockscout.git","ssh_url":"git@github.com:poanetwork/blockscout.git","clone_url":"https://github.com/poanetwork/blockscout.git","svn_url":"https://github.com/poanetwork/blockscout","homepage":"https://blockscout.com","size":8115,"stargazers_count":250,"watchers_count":250,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"archived":false,"open_issues_count":153,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":76,"open_issues":153,"watchers":250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/poanetwork/blockscout/pulls/960"},"html":{"href":"https://github.com/poanetwork/blockscout/pull/960"},"issue":{"href":"https://api.github.com/repos/poanetwork/blockscout/issues/960"},"comments":{"href":"https://api.github.com/repos/poanetwork/blockscout/issues/960/comments"},"review_comments":{"href":"https://api.github.com/repos/poanetwork/blockscout/pulls/960/comments"},"review_comment":{"href":"https://api.github.com/repos/poanetwork/blockscout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/poanetwork/blockscout/pulls/960/commits"},"statuses":{"href":"https://api.github.com/repos/poanetwork/blockscout/statuses/cff47e9d0e1b8b1352af7d96b1621416160dace5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"feliperenan"}}