{"id":15192277,"url":"https://github.com/qyuqianchen/distribution-script","last_synced_at":"2026-02-19T11:32:15.631Z","repository":{"id":243666835,"uuid":"813020581","full_name":"QYuQianchen/Distribution-script","owner":"QYuQianchen","description":"This script uses `alloy-rs` for Ethereum primitives and `graphql_client` to query subgraphs. When querying subgraphs, it first attempts to query the production subgraph endpoint but falls back to the development endpoint in the Subgraph Studio.","archived":false,"fork":false,"pushed_at":"2024-06-15T15:24:19.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T20:40:01.418Z","etag":null,"topics":["alloy-rs","graphql-client","rust","subgraph"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QYuQianchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-06-10T10:57:14.000Z","updated_at":"2024-06-15T15:24:23.000Z","dependencies_parsed_at":"2024-09-18T18:05:27.698Z","dependency_job_id":null,"html_url":"https://github.com/QYuQianchen/Distribution-script","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"9bfc7fa0b70dba609a7ffdb2c6ce6f21d8612737"},"previous_names":["qyuqianchen/distribution-script"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/QYuQianchen/Distribution-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QYuQianchen%2FDistribution-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QYuQianchen%2FDistribution-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QYuQianchen%2FDistribution-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QYuQianchen%2FDistribution-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QYuQianchen","download_url":"https://codeload.github.com/QYuQianchen/Distribution-script/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QYuQianchen%2FDistribution-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279024540,"owners_count":26087778,"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-10-14T02:00:06.444Z","response_time":60,"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":["alloy-rs","graphql-client","rust","subgraph"],"created_at":"2024-09-27T21:21:10.593Z","updated_at":"2025-10-14T23:25:55.729Z","avatar_url":"https://github.com/QYuQianchen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Distribution Script\n\nThis command-line application, written in Rust, verifies signed Gnosis validator data and checks if the signer an active HOPR node runner.\n\nThis script uses `alloy-rs` for Ethereum primitives and `graphql_client` to query subgraphs. When querying subgraphs, it first attempts to query the production subgraph endpoint but falls back to the development endpoint in the Subgraph Studio.\n\n## Development Installation\n1. Install Rust using the [official guide](https://www.rust-lang.org/tools/install).\n2. Build:\n```shell\n$ cargo build\n```\n3. Create a `.env` file according to the `.env.example` and fill it in with API keys.\n4. Load environmental variables:\n```shell\n$ source .env\n```\n5. Run to see the `--help` message:\n```shell\n$ cargo run -- -h\n```\n\n## Usage\n1. Production build:\n```shell\n$ cargo build --release\n```\n\n```shell\n$ ./target/release/distribution_script --help\nUsage: distribution_script [OPTIONS] --deposit-data-dir \u003cDEPOSIT_DATA_DIR\u003e --claim-history-path \u003cCLAIM_HISTORY_PATH\u003e\n\nOptions:\n    -i, --input-signed-data-dir \u003cINPUT_SIGNED_DATA_DIR\u003e\n            Directory to where all the input signed deposit data files are stored\n    -o, --output-deposit-data-dir \u003cOUTPUT_DEPOSIT_DATA_DIR\u003e\n            Directory to where the final output deposit data file is stored\n    -t, --hopr-amount \u003cHOPR_AMOUNT\u003e\n            HOPR amount in ether, e.g., 10000000 [default: 10000000]\n    -m, --min-nodes \u003cMIN_NODES\u003e\n            Minimum number of nodes in a Safe [default: 1]\n    -b, --block-number \u003cBLOCK_NUMBER\u003e\n            Snapshot block number for the subgraph query [default: 34310645]\n    -h, --help\n            Print help\n    -V, --version\n            Print version\n```\n\n## Example\nThere are two identical signed deposit datas under the `./test/input` folder. Check if they are eligible if the minimum requirement is to have at least 20 HOPR tokens in a Safe and 1 running HOPR node:\n```shell\n$ cargo run -- --input-signed-data-dir ./test/input -o ./test --hopr-amount 20 --min-nodes 1 --claim-history-path ./test/claim_history.csv \u003e ./test/result.log\n```\nThe command above should return an empty array as a result.\n\n```shell\n$ cargo run -- --input-signed-data-dir ./test/input -o ./test --hopr-amount 0 --min-nodes 0 --claim-history-path ./test/claim_history.csv \u003e ./test/result.log\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqyuqianchen%2Fdistribution-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqyuqianchen%2Fdistribution-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqyuqianchen%2Fdistribution-script/lists"}