{"id":16354766,"url":"https://github.com/vikiival/mimick","last_synced_at":"2025-08-24T17:39:20.389Z","repository":{"id":115872864,"uuid":"563336363","full_name":"vikiival/mimick","owner":"vikiival","description":"Indexer for ink! based NFTs","archived":false,"fork":false,"pushed_at":"2024-09-05T13:07:27.000Z","size":1377,"stargazers_count":1,"open_issues_count":15,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T11:12:18.263Z","etag":null,"topics":["ink","kodadot","subsquid"],"latest_commit_sha":null,"homepage":"","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/vikiival.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}},"created_at":"2022-11-08T12:04:58.000Z","updated_at":"2024-09-05T16:36:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3360f05-2b02-41e3-b8a5-b37603e3b6bb","html_url":"https://github.com/vikiival/mimick","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"subsquid-labs/squid-ink-template","purl":"pkg:github/vikiival/mimick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikiival%2Fmimick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikiival%2Fmimick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikiival%2Fmimick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikiival%2Fmimick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikiival","download_url":"https://codeload.github.com/vikiival/mimick/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikiival%2Fmimick/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271915411,"owners_count":24843188,"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-24T02:00:11.135Z","response_time":111,"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":["ink","kodadot","subsquid"],"created_at":"2024-10-11T01:36:53.412Z","updated_at":"2025-08-24T17:39:20.370Z","avatar_url":"https://github.com/vikiival.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WASM squid template (FireSquid edition)\n\nThis is a squid template for indexing Ink!-based contracts, supported e..g by the Astar and Shibuya network. \nThis template indexes a sample ERC-20 Ink!-based smart contract token transfers over the [Shibuya network](https://docs.astar.network/docs/quickstart/endpoints) and serves them via graphql API.\n\nFor more details, inspect the [Squid SDK docs](https://docs.subsquid.io/develop-a-squid/substrate-processor/wasm-support/) and an [Ink! indexing tutorial](https://docs.subsquid.io/tutorials/create-a-wasm-processing-squid/).\n\n## Quickstart\n\n```bash\n# 1. Update Squid SDK and install dependencies\nnpm run update\nnpm ci\n\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\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](http://localhost:3001/develop-a-squid/schema-file/).\n\n### 2. Generate TypeORM classes\n\nMapping developers use TypeORM [EntityManager](https://typeorm.io/#/working-with-entity-manager)\nto interact with the target database. All the necessary entity classes are\ngenerated from `schema.graphql`. This is done by running \n```\nnpx sqd codegen\n```\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 WASM logs. For this template we used standard ERC20 interface, see [`assets/erc20.json`](assets/erc20.json).\n\nTo generate a type-safe facade class to decode EVM logs, use `squid-ink-typegen(1)`:\n\n```bash\nnpx squid-ink-typegen --abi assets/erc20.json --output src/abi/erc20.ts\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.\nMore details will be added later.\n\n\n## Hacks\n\nThe following hacks are used to make the template work:\n\n### 1. Update the storage in ABI\n\n[HACK URL](https://github.com/Cardinal-Cryptography/indexer/pull/1/files#diff-198e7215cc0ef863208df6bb3240d27c07af189a7dcf3a686ffb056663967359L396-R399)\n\nIn your ABI replace storage with this\n\n```json\n{\n    \"storage\": {\n      \"cell\": {\n        \"key\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n        \"ty\": 0\n      }\n    }\n}\n```\n\n### 2. Contract address needs to be set in the public-key format\n\n- `abXaTso17JvAekJoBYy3Aam92FQWxPsfxjag1fhncz2oraY` -\u003e `0xce18fa994c9c20b8892ba6dd8c19b108df272f6ac196944b95e664560f94a554`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikiival%2Fmimick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikiival%2Fmimick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikiival%2Fmimick/lists"}