{"id":30039369,"url":"https://github.com/ethersphere/batch-export","last_synced_at":"2025-10-24T01:02:44.040Z","repository":{"id":300996100,"uuid":"978568957","full_name":"ethersphere/batch-export","owner":"ethersphere","description":"batch-export is a tool to retrieve Ethereum event logs for Swarm's Postage Stamp contract on the Gnosis Chain","archived":false,"fork":false,"pushed_at":"2025-06-24T15:56:33.000Z","size":162,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-24T16:49:13.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethersphere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T07:28:51.000Z","updated_at":"2025-06-05T07:08:14.000Z","dependencies_parsed_at":"2025-06-24T16:49:15.992Z","dependency_job_id":"017b58df-1ce2-4615-9e5a-e492a5d6fbaf","html_url":"https://github.com/ethersphere/batch-export","commit_stats":null,"previous_names":["ethersphere/batch-export"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ethersphere/batch-export","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbatch-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbatch-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbatch-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbatch-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethersphere","download_url":"https://codeload.github.com/ethersphere/batch-export/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbatch-export/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269185745,"owners_count":24374629,"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","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-08-07T01:42:18.963Z","updated_at":"2025-10-24T01:02:43.711Z","avatar_url":"https://github.com/ethersphere.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# batch-export\n\nbatch-export is a tool to retrieve Ethereum event logs for specific contracts, particularly designed for Swarm's Postage Stamp contract on the Gnosis Chain. It fetches logs within a specified block range using the `export` command and saves them to a file.\n\n## Features\n\n- Retrieve event logs for a specified contract address and block range.\n- Handles large block ranges by querying in smaller chunks.\n- Supports rate limiting for RPC requests.\n- Saves retrieved logs to a specified output file (default: `export.ndjson`) in NDJSON format.\n- Graceful shutdown on interrupt signals (Ctrl+C).\n\n## Requirements\n\n- Go 1.24 or later\n\n## Installation\n\n```sh\ngit clone https://github.com/ethersphere/batch-export.git\ncd batch-export\nmake binary\n# The binary will be located in the dist/ folder\n```\n\n## Usage\n\nThe primary command is export.\n\n```sh\n./dist/batch-export export --help\n```\n\n```sh\n./dist/batch-export export \\\n    --start 31306381 \\\n    --endpoint \u003cYOUR_GNOSIS_RPC_ENDPOINT\u003e \\\n    --output my_logs.ndjson\n```\n\n## Flags\n\n```sh\n  -b, --block-range-limit uint32   Max blocks per log query (default 5)\n  -c, --compress                   Compress to GZIP\n      --end uint                   End block (optional, uses latest block if 0) (default 39810670)\n  -e, --endpoint string            Ethereum RPC endpoint URL\n  -h, --help                       help for export\n  -m, --max-request int            Max RPC requests/sec (default 15)\n  -o, --output string              Output file path (NDJSON) (default \"export.ndjson\")\n      --start uint                 Start block (optional, uses contract start block if 0) (default 31306381)\n  -v, --verbosity string           Log verbosity (silent, error, warn, info, debug) (default \"info\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethersphere%2Fbatch-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethersphere%2Fbatch-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethersphere%2Fbatch-export/lists"}