{"id":28431791,"url":"https://github.com/blockscout/zilliqa-stakers-squid","last_synced_at":"2026-02-19T01:30:59.878Z","repository":{"id":271690262,"uuid":"914260411","full_name":"blockscout/zilliqa-stakers-squid","owner":"blockscout","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-18T08:23:52.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-02T03:46:31.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/blockscout.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,"zenodo":null}},"created_at":"2025-01-09T08:56:03.000Z","updated_at":"2025-07-18T08:23:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a0cc265-dc80-47e8-821e-2e8e2a5c1e78","html_url":"https://github.com/blockscout/zilliqa-stakers-squid","commit_stats":null,"previous_names":["blockscout/zilliqa-stakers-squid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blockscout/zilliqa-stakers-squid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockscout%2Fzilliqa-stakers-squid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockscout%2Fzilliqa-stakers-squid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockscout%2Fzilliqa-stakers-squid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockscout%2Fzilliqa-stakers-squid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockscout","download_url":"https://codeload.github.com/blockscout/zilliqa-stakers-squid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockscout%2Fzilliqa-stakers-squid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"ssl_error","status_checked_at":"2026-02-19T00:59:36.936Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-06-05T16:08:35.771Z","updated_at":"2026-02-19T01:30:59.729Z","avatar_url":"https://github.com/blockscout.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zilliqa Stakers Squid\n\nAn indexer for Zilliqa Stakers built with [Subsquid SDK][subsquid-sdk]. This\nindexer specifically targets the [`Deposit` contract][deposit-contract].\n\n## Environment Variables\n\n| Environment Variable         | Description                                   |\n|------------------------------|-----------------------------------------------|\n| `ETH_RPC_URL`                | URL of the Zilliqa JSON RPC endpoint          |\n| `ETH_RPC_BLOCKS_BATCH_SIZE`  | Number of blocks to fetch in each batch       |\n| `CONTRACT_ADDRESS`           | Address of the target contract                |\n| `FROM_BLOCK_NUMBER`          | Block number to start indexing from           |\n| `DB_URL`                     | URL of the PostgreSQL database                |\n\n## Running with Docker\n\n1. **Create a `.env` file**: Include the required environment variables as\n   mentioned [above](#environment-variables). For the prototestnet, an example\n   `.env` file looks like this:\n\n    ```env\n    ETH_RPC_URL=https://api.zq2-prototestnet.zilliqa.com \n    ETH_RPC_BLOCKS_BATCH_SIZE=10000\n    CONTRACT_ADDRESS=0x00000000005A494C4445504F53495450524F5859\n    FROM_BLOCK_NUMBER=7522968\n    DB_URL=postgresql://postgres:postgres@localhost:5432/zilliqa\n    ```\n\n1. **Expose Prometheus Metrics (Optional)**: To enable Prometheus metrics, set\n   the `PROMETHEUS_PORT` environment variable in the `.env` file. Metrics will\n   be accessible at `http://localhost:\u003cPROMETHEUS_PORT\u003e/metrics` within the\n   container.\n\n    ```env\n    PROMETHEUS_PORT=3000\n    ```\n\n1. **Run the Docker container**: \n\n    ```bash\n    docker run --env-file .env ghcr.io/blockscout/zilliqa-stakers-squid:0.1.0\n    ```\n\n    **Note:** Replace `0.1.0` with the desired version tag.\n\n---\n\n## Development\n\n### Setup\n\nFor development setup, refer to the [development environment setup\nguide][development-environment-set-up].\n\nIf you use the **Nix package manager**, the provided `flake.nix` can simplify\nthe setup. Using **direnv** will automatically configure your environment.\n\n### GraphQL Schema Updates\n\nIf you modify the `graphql.schema`, you need to regenerate the\n[TypeORM](https://github.com/typeorm/typeorm/tree/master) classes:\n\n```bash\nnpx squid-typeorm-codegen\n```\n\n**Note:** The schema must comply with the `zilliqa_stakers` schema defined in\nthe Blockscout backend. See the `Explorer.Chain.Zilliqa.Staker` module and the\ncorresponding migrations in `apps/explorer/priv/zilliqa/migrations`[^1].\n\n### Running Locally\n\n1. **Create a `.env` file**: Include the required environment variables as\n   mentioned [above](#environment-variables).\n\n2. **Compile the application**:\n\n    ```bash\n    npx tsc\n    ```\n\n3. **Run the indexer**:\n\n    ```bash\n    node -r dotenv/config lib/main.js\n    ```\n\n[^1]: Refer to the `Explorer.Chain.Zilliqa.Staker` module and corresponding\n    migrations in `apps/explorer/priv/zilliqa/migrations`.\n\n[subsquid-sdk]: https://github.com/subsquid/squid-sdk\n[development-environment-set-up]:\n    https://docs.sqd.dev/sdk/how-to-start/development-environment-set-up/\n[deposit-contract]:\n    https://github.com/Zilliqa/zq2/blob/main/zilliqa/src/contracts/deposit_v3.sol\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockscout%2Fzilliqa-stakers-squid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockscout%2Fzilliqa-stakers-squid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockscout%2Fzilliqa-stakers-squid/lists"}