{"id":31959642,"url":"https://github.com/ldsanchez/eth-indexer","last_synced_at":"2025-10-14T15:47:53.665Z","repository":{"id":212113059,"uuid":"572573026","full_name":"ldsanchez/eth-indexer","owner":"ldsanchez","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-30T15:05:51.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-12T16:34:06.787Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ldsanchez.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}},"created_at":"2022-11-30T15:05:49.000Z","updated_at":"2023-12-12T16:34:31.308Z","dependencies_parsed_at":null,"dependency_job_id":"a48e4c95-3404-41bd-81d5-3ec139adf720","html_url":"https://github.com/ldsanchez/eth-indexer","commit_stats":null,"previous_names":["ldsanchez/eth-indexer"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/ldsanchez/eth-indexer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldsanchez%2Feth-indexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldsanchez%2Feth-indexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldsanchez%2Feth-indexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldsanchez%2Feth-indexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ldsanchez","download_url":"https://codeload.github.com/ldsanchez/eth-indexer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ldsanchez%2Feth-indexer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019341,"owners_count":26086711,"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":[],"created_at":"2025-10-14T15:47:46.208Z","updated_at":"2025-10-14T15:47:53.660Z","avatar_url":"https://github.com/ldsanchez.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal Ethereum mainnet squid\n\nThis is a minimal runnable template of a squid run against an Ethereum mainnet. It does not index any data. To index Ethereum transaction and event data, modify `src/processor.ts` and subscribe to EVM logs and transactions. \n\nFor a step-by-step migration guide from TheGraph, see [the dedicated docs page](https://docs.subsquid.io/migrate/migrate-subgraph/).\n\nFor full details on how to transform the data and serve with a GraphQL API, consult [the docs](https://docs.subsquid.io). \n\n\n## Quickstart\n\n```bash\n# 1. Install dependencies\nnpm ci\n\n# 2. Compile typescript files\nmake build\n\n# 3. Start target Postgres database and detach\nmake up\n\n# 4. Start the processor\nmake process\n\n# 5. The command above will block the terminal\n#    being busy with fetching the chain data, \n#    transforming and storing it in the target database.\n#\n#    To start the graphql server open the separate terminal\n#    and run. The GraphQL playground will be available at localhost:4350graphl\nmake serve\n```\n\n## Dev flow\n\n### 1. Define database schema\n\nStart development by defining the schema of the target database via `schema.graphql`.\nSchema definition consists of regular graphql type declarations annotated with custom directives.\nFull description of `schema.graphql` dialect is available [here](https://docs.subsquid.io/schema-spec).\n\n### 2. Generate TypeORM classes\n\nMapping developers use TypeORM [EntityManager](https://typeorm.io/#/working-with-entity-manager)\nto interact with target database during data processing. All necessary entity classes are\ngenerated by the squid framework from `schema.graphql`. This is done by running `npx sqd codegen`\ncommand.\n\n### 3. Generate database migration\n\nAll database changes are applied through migration files located at `db/migrations`.\n`squid-typeorm-migration(1)` tool provides several commands to drive the process.\nIt is all [TypeORM](https://typeorm.io/#/migrations) under the hood.\n\n```bash\n# Connect to database, analyze its state and generate migration to match the target schema.\n# The target schema is derived from entity classes generated earlier.\n# Don't forget to compile your entity classes beforehand!\nnpx squid-typeorm-migration generate\n\n# Create template file for custom database changes\nnpx squid-typeorm-migration create\n\n# Apply database migrations from `db/migrations`\nnpx squid-typeorm-migration apply\n\n# Revert the last performed migration\nnpx squid-typeorm-migration revert   \n```\n\n### 4. Import ABI contract and generate interfaces to decode events\n\nIt is necessary to import the respective ABI definition to decode EVM logs. \n\nTo generate a type-safe facade class to decode EVM logs, use `squid-evm-typegen(1)`. For example, for a ERC721 contract use\n\n```bash\nnpx squid-evm-typegen --abi src/abi/ERC721.json --output src/abi/ERC721.ts\n```\n\n\n## Project conventions\n\nSquid tools assume a certain project layout.\n\n* All compiled js files must reside in `lib` and all TypeScript sources in `src`.\nThe layout of `lib` must reflect `src`.\n* All TypeORM classes must be exported by `src/model/index.ts` (`lib/model` module).\n* Database schema must be defined in `schema.graphql`.\n* Database migrations must reside in `db/migrations` and must be plain js files.\n* `sqd(1)` and `squid-*(1)` executables consult `.env` file for a number of environment variables.\n\n## GraphQL server extensions\n\nIt is possible to extend `squid-graphql-server(1)` with custom\n[type-graphql](https://typegraphql.com) resolvers and to add request validation. See [the docs](https://docs.subsquid.io/develop-a-squid/graphql-api/custom-resolvers/) for more details.\n\n\n## Disclaimer\n\nThis is alpha-quality software. The Squid SDK may introduce breaking changes in future versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldsanchez%2Feth-indexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fldsanchez%2Feth-indexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fldsanchez%2Feth-indexer/lists"}