{"id":19610696,"url":"https://github.com/onflow/flow-batch-scan","last_synced_at":"2025-04-27T22:32:59.300Z","repository":{"id":65389505,"uuid":"590538827","full_name":"onflow/flow-batch-scan","owner":"onflow","description":"Library for running batch scans of the flow network","archived":false,"fork":false,"pushed_at":"2024-09-10T19:54:25.000Z","size":132,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-04-05T04:04:09.854Z","etag":null,"topics":["blockchain","cadence","go","scanner"],"latest_commit_sha":null,"homepage":"https://onflow.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-18T16:40:27.000Z","updated_at":"2024-09-10T19:52:28.000Z","dependencies_parsed_at":"2024-06-20T12:06:58.618Z","dependency_job_id":"4a76a533-1c50-45f2-94c4-bb30b07bd75d","html_url":"https://github.com/onflow/flow-batch-scan","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fflow-batch-scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fflow-batch-scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fflow-batch-scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onflow%2Fflow-batch-scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onflow","download_url":"https://codeload.github.com/onflow/flow-batch-scan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251219600,"owners_count":21554444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cadence","go","scanner"],"created_at":"2024-11-11T10:32:04.375Z","updated_at":"2025-04-27T22:32:54.287Z","avatar_url":"https://github.com/onflow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flow Batch Scan\n\nA library to make it easy to scan the entire flow chain.\n\n## How does it work\n\nThe `BlockScanner.Scan` method will perform a **full scan** of all the addresses on chain starting at the latest available block using the provided cadence `script`.\nThis will take some time, during which the **full scan** has to switch newer reference blocks, because the old ones are no longer available.\nTo ensure that the final data is accurate when the scan ends, an **incremental scan** also runs besides the **full scan**.\nThe incremental scan looks at new blocks for any accounts could have had their data changed during that block (the data that the `script` is looking for).\nIf there are candidates to be scanned, the incremental scanner will scan them with the same `script` and update the results of the `full scan`.\n\nIn continuous mode the incremental scan will keep running and will scan any candidates that might have changed.\n\nThe library expects 3 components:\n\n- a cadence `script` that has to accept an address array as input `addresses: [Address]` and returns any cadence value as the `result`.\n- an array of candidate scanners which scan a block range looking for accounts that could have had changed, so that the `script` would now return a different result.\n- a `result handler` that will be called with the results of the `script` for each address array.\n\n## Use case\n\nAny quantity can be scanned for if:\n- it can be observed by a cadence script\n- the change of the quantity can be observed by looking at transaction results of a block (e.g: events)\n\nExample:\n1. Scanning for contracts deployed on accounts. (see `examples/contracts`)\n2. Scanning for accounts FT or NFT balance.\n3. Scanning for public keys added to accounts.\n\n## Examples\n\nSee the `examples` folder, there are a lot of comments in there.\nThe `contract_names` example is a one time scan example.\nthe `monitoer_contract_deployments` example is a continuous scan example and builds on the `contract_names` example.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonflow%2Fflow-batch-scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonflow%2Fflow-batch-scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonflow%2Fflow-batch-scan/lists"}