{"id":18369807,"url":"https://github.com/cawfree/autographed","last_synced_at":"2025-04-06T18:32:31.942Z","repository":{"id":57748478,"uuid":"523313091","full_name":"cawfree/autographed","owner":"cawfree","description":"The self-building, hot-reloading subgraph. The quickest way to start indexing your shit.","archived":false,"fork":false,"pushed_at":"2022-08-11T12:10:28.000Z","size":151,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T04:31:42.725Z","etag":null,"topics":["ethereum","graphprotocol","indexing","subgraph","the-graph"],"latest_commit_sha":null,"homepage":"https://thegraph.com/en/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cawfree.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}},"created_at":"2022-08-10T11:17:30.000Z","updated_at":"2024-07-09T09:48:13.000Z","dependencies_parsed_at":"2022-08-28T23:33:07.173Z","dependency_job_id":null,"html_url":"https://github.com/cawfree/autographed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fautographed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fautographed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fautographed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cawfree%2Fautographed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cawfree","download_url":"https://codeload.github.com/cawfree/autographed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531307,"owners_count":20953932,"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","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":["ethereum","graphprotocol","indexing","subgraph","the-graph"],"created_at":"2024-11-05T23:32:14.199Z","updated_at":"2025-04-06T18:32:29.505Z","avatar_url":"https://github.com/cawfree.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [`npx autographed`](https://github.com/cawfree/autographed)\nThe self-building, hot-reloading subgraph. The quickest way to start indexing your shit.\n\n### 🚀 getting started \n\nOkay, so there's _a lot_ that goes into [__running a subgraph__](https://thegraph.com/docs/en/deploying/deploying-a-subgraph-to-hosted/). The purpose of this library is to take care of most of that, and just get you to indexing your smart contract as quickly as possible.\n\n\u003e __Notice:__ `autographed` dynamically generates all the mappings and runtime architecture you need to quickly query for historical blockchain data emitted during smart contract [`event`](https://solidity-by-example.org/events/)s. It is not suitable for writing custom indexing logic.\n\nIf this sounds like  a good fit for you, you will need to make sure you have some of the following system dependencies available on your runtime.\n\nFirst, please make sure you've installed and configured the [__Rust Toolchain__](https://www.rust-lang.org/):\n\n```shell\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nOn top of that, you'll need to be able to run [__Docker Containers__](https://www.docker.com/). The easiest way to do this is to download and install [__Docker Desktop__](https://www.docker.com/products/docker-desktop/).\n\nWith these steps out of the way, you'll finally need to install these last low-level dependencies:\n\n```shell\nipfs jq gsed libpq cmake\n```\n\nInside of your [__hardhat project root__](https://hardhat.org/hardhat-runner/docs/getting-started#overview), create a `.autograph.json`. This is what's used to control the name of the autogenerated subgraph, and which contracts in your local hardhat project you want to get indexed. You'll want to provide the addresses the contracts get deployed to when initializing your local chain.\n\n```json\n{\n  \"name\": \"MySubgraphName\",\n  \"sources\": [\n    {\n      \"contractName\": \"MyContractName\",\n      \"contractAddress\": \"0x...\"\n    }\n  ]\n}\n```\n\nFor a vanilla project configuration, an initial contract deployment transaction sent by `(await ethers.getSigners())[0]`, commonly referred to as `owner`, will be stored at the on-chain address `0x5FbDB2315678afecb367f032d93F642f64180aa3`.\n\nThere are some additional configuration options that can be used to tune the generator to your local runtime. By default, `autographed` will use the following settings:\n\n```shell\nGRAPH_NODE_GRAPHQL_PORT=8000\nGRAPH_NODE_STATUS_PORT=8020\nIPFS_PORT=5001\nPOSTGRES_PORT=5432\nETHEREUM_PORT=8545\nETHEREUM_NETWORK=hardhat\nPOSTGRES_DB=dev\nPOSTGRES_USER=dev\nPOSTGRES_PASSWORD=dev\n```\n\nThese can be overridden using [__environment variables__](https://stackoverflow.com/a/34154491) i.e:\n\n```shell\nIPFS_PORT=420 ETHEREUM_PORT=6969 npx autographed\n```\n\n\u003e There's a ton of binary files that will need to be compiled on your first run. In the mean time, why don't you put on a cup of coffee or do some yoga or something? ☕️\n\n### 🔨 building\nIf you'd like to build this repo yourself, just `git clone` and run `yarn` from the top-level directory. You can also use `yarn test` to make sure everything's working okay or if you need to debug any issues you ~~might~~ will encounter.\n\n### ✌️ license\n[__MIT__](./LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Fautographed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcawfree%2Fautographed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcawfree%2Fautographed/lists"}