{"id":37130524,"url":"https://github.com/manifest-network/yaci","last_synced_at":"2026-02-28T03:01:18.497Z","repository":{"id":259113488,"uuid":"874864049","full_name":"manifest-network/yaci","owner":"manifest-network","description":"Yet Another Cosmos Indexer","archived":false,"fork":false,"pushed_at":"2026-01-16T15:45:14.000Z","size":193,"stargazers_count":18,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-22T03:57:52.644Z","etag":null,"topics":["blockchain","cosmos","indexer","json","postgresql","web3"],"latest_commit_sha":null,"homepage":"https://yaci.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manifest-network.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-18T15:45:46.000Z","updated_at":"2026-01-16T15:44:25.000Z","dependencies_parsed_at":"2024-10-28T15:12:44.648Z","dependency_job_id":"b592237e-9ba7-4c44-82d8-35933dd63619","html_url":"https://github.com/manifest-network/yaci","commit_stats":null,"previous_names":["liftedinit/cosmos-dump","manifest-network/yaci"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/manifest-network/yaci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manifest-network%2Fyaci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manifest-network%2Fyaci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manifest-network%2Fyaci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manifest-network%2Fyaci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manifest-network","download_url":"https://codeload.github.com/manifest-network/yaci/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manifest-network%2Fyaci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29923428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"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":["blockchain","cosmos","indexer","json","postgresql","web3"],"created_at":"2026-01-14T15:00:37.670Z","updated_at":"2026-02-28T03:01:18.488Z","avatar_url":"https://github.com/manifest-network.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eyaci\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/cosmos/chain-registry/00df6ff89abd382f9efe3d37306c353e2bd8d55c/manifest/images/manifest.png\" alt=\"Manifest Network\" width=\"100\"/\u003e\n\u003c/p\u003e\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/manifest-network/yaci/ci.yml)\n[![codecov](https://codecov.io/github/manifest-network/yaci/graph/badge.svg?token=E0fP14l7Ct)](https://codecov.io/github/manifest-network/yaci)\n[![Go Report Card](https://goreportcard.com/badge/github.com/manifest-network/yaci)](https://goreportcard.com/report/github.com/manifest-network/yaci)\n\n`yaci` is a command-line tool that connects to a gRPC server and extracts blockchain data.\n\n## Use-case\n\nOff-chain indexing of block \u0026 transaction data.\n\n## Requirements\n\n- Go 1.25.5\n- Docker \u0026 Docker Compose (optional)\n- CosmosSDK \u003e= 0.50 (chain to index)\n\n\u003e [!IMPORTANT]\n\u003e When indexing an existing blockchain with pruning enabled, start the indexer from a recent block height that has not been pruned.\n\n## Features\n\n- Ability to extract block and transaction chain data to PostgreSQL.\n- Leverages gRPC server reflection; no need to specify the proto file.\n- (Nested) `Any` type are properly decoded.\n- Live monitoring of the blockchain.\n- Batch extraction of data.\n\n## Installation\n\nTo install the `yaci` tool, you need to have Go installed on your system. Then, you can use the following command to install `yaci`:\n\n```sh\ngo install github.com/manifest-network/yaci@latest\n```\n\nThe `yaci` binary will be installed in the `$GOPATH/bin` directory.\n\n## Usage\nThe basic usage of the yaci tool is as follows:\n```shell\nyaci [command] [address] [flags]\n```\n\n## Commands\n\n- `completion` - Generate the autocompletion script for the specified shell.\n- `extract` - Extracts blockchain data to various output format.\n- `help` - Help about any command.\n- `version` - Prints the version of the tool. \n\n## Global Flags\n\n- `-l`, `--logLevel` - The log level (default: \"info\")'\n\n## Extract Command\n\nExtract blockchain data and output it in the specified format.\n\n## Flags\n\nThe following flags are available for all `extract` subcommand:\n\n- `-t`, `--block-time` - The time to wait between each block extraction (default: 2s)\n- `-s`, `--start` - The starting block height to extract data from (default: 1)\n- `-e`, `--stop` - The stopping block height to extract data from (default: 1)\n- `-k`, `--insecure` - Skip TLS certificate verification (default: false)'\n- `--live` - Continuously extract data from the blockchain (default: false)\n- `--reindex` - Reindex the entire database from block 1 (default: false)'\n- `-r`, `--max-retries` - The maximum number of retries to connect to the gRPC server (default: 3)\n- `-c`, `--max-concurrency` - The maximum number of concurrent requests to the gRPC server (default: 100)\n- `-m`, `--max-recv-msg-size` - The maximum gRPC message size, in bytes, the client can receive (default: 4194304 (4MB))'\n- `--enable-prometheus` - Enable Prometheus metrics (default: false)\n- `--prometheus-addr` - The address to bind the Prometheus metrics server to (default: \"0.0.0.0:2112\")\n\n### Subcommands\n\n- `postgres` - Extracts blockchain data to a PostgreSQL database.\n\n### PostgreSQL Subcommand\n\nExtract blockchain data and output it to a PostgreSQL database.\n\nThe PostgreSQL database has the following schema:\n\n```mermaid\nerDiagram\n  \"api.transactions_main\" {\n    varchar(64) id\n    jsonb fee\n    text memo\n    text error\n    string height\n    text timestamp\n    text[] proposal_id\n  }\n  \"api.messages_raw\" {\n    varchar(64) id\n    bigint message_index\n    jsonb data\n  }\n  \"api.messages_main\" {\n    varchar(64) id\n    bigint message_index\n    text type\n    text sender\n    text[] mentions\n    jsonb metadata\n  }\n  \"api.transactions_raw\" {\n    varchar(64) id\n    jsonb data\n  }\n  \"api.transactions_raw\" ||--|| \"api.transactions_main\" : \"trigger insert/update\"\n  \"api.transactions_raw\" ||--o{ \"api.messages_raw\": \"trigger insert/update\"\n  \"api.messages_raw\" ||--|| \"api.messages_main\" : \"trigger insert/update\"\n  \"api.blocks_raw\" {\n    serial id\n    jsonb data\n  }\n  \"api.events_raw\" {\n    varchar(64) id\n    bigint event_index\n    jsonb data\n  }\n  \"api.events_main\" {\n    varchar(64) id\n    bigint event_index\n    bigint attr_index\n    text event_type\n    text attr_key\n    text attr_value\n    bigint msg_index\n  }\n  \"api.transactions_raw\" ||--o{ \"api.events_raw\": \"trigger insert/update\"\n  \"api.events_raw\" ||--|| \"api.events_main\" : \"trigger insert/update\"\n```\n\n#### Usage\n\n```\nUsage:\n  yaci extract postgres [address] [flags]\n```\n\n#### Flags\n\n- `-p`, `--postgres-conn` - The PostgreSQL connection string\n\n#### Example\n\n```shell\nyaci extract postgres localhost:9090 -p postgres://postgres:foobar@localhost/postgres -s 106000 -k --live -t 5\n```\n\nThis command will connect to the gRPC server running on `localhost:9090`, continuously extract data from block height `106000` and store the extracted data in the `postgres` database. New blocks and transactions will be inserted into the database every 5 seconds.\n\n#### PostgreSQL Functions\n\nThe following PostgreSQL functions are available:\n\n- `get_messages_for_address(_address)`: Returns relevant transactions for a given address.\n\n## Configuration\n\nThe `yaci` tool parameters can be configured from the following sources\n\n- Environment variables (prefixed with `YACI_`)\n- Configuration file (`config.yaml`, `config.json`, `config.toml`, `config.hcl`, [~~`config.env`~~](https://github.com/manifest-network/yaci/issues/15) )\n- Command-line flags\n\nThe command-line flags have the highest priority, followed by the environment variables, and then the configuration file.\n\nThe environment variables are prefixed with `YACI_` and are in uppercase. For example, the `--logLevel` flag can be set using the `YACI_LOGLEVEL` environment variable. Dash (`-`) is replaced with underscore (`_`). For example, the `--block-time` flag can be set using the `YACI_BLOCK_TIME` environment variable.\n\nThe configuration file is searched in the following order:\n- The current working directory (`./`)\n- The user's home directory (`$HOME/.yaci`)\n- The system's configuration directory (`/etc/yaci`)\n\n## Demo\n\nTo run the demo, you need to have Docker installed on your system. Then, you can run the following command:\n\n```shell\n# Build and start the e2e environment\nmake docker-up\n```\n\nWait for the e2e environment to start. Then, open a new browser tab and navigate to http://localhost:3000/blocks?order=id.desc to view the blocks and to http://localhost:3000/transactions to view the transactions.\n\nRun\n\n```shell\nmake docker-down\n```\n\nto stop the e2e environment.\n\n## Testing\n\nTo run the unit tests, you can use the following command:\n\n```shell\nmake test\n```\n\nTo run the end-to-end tests, you can use the following command:\n\n```shell\nmake test-e2e\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Disclaimer\n\nThis software is provided \"as is\", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanifest-network%2Fyaci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanifest-network%2Fyaci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanifest-network%2Fyaci/lists"}