{"id":18492997,"url":"https://github.com/graphprotocol/hackathon-scaffold","last_synced_at":"2025-07-30T02:04:02.279Z","repository":{"id":43018298,"uuid":"151802858","full_name":"graphprotocol/hackathon-scaffold","owner":"graphprotocol","description":"A starting point for building dApps on The Graph","archived":false,"fork":false,"pushed_at":"2022-03-23T00:30:24.000Z","size":3855,"stargazers_count":4,"open_issues_count":1,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T16:50:02.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/graphprotocol.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}},"created_at":"2018-10-06T03:54:13.000Z","updated_at":"2022-08-31T08:23:46.000Z","dependencies_parsed_at":"2022-09-09T13:52:41.703Z","dependency_job_id":null,"html_url":"https://github.com/graphprotocol/hackathon-scaffold","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graphprotocol/hackathon-scaffold","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fhackathon-scaffold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fhackathon-scaffold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fhackathon-scaffold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fhackathon-scaffold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphprotocol","download_url":"https://codeload.github.com/graphprotocol/hackathon-scaffold/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fhackathon-scaffold/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261005875,"owners_count":23095935,"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":[],"created_at":"2024-11-06T13:12:10.922Z","updated_at":"2025-06-20T19:38:08.536Z","avatar_url":"https://github.com/graphprotocol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hackathon scaffold project\n\nThis project consists of three parts:\n\n- Example Solidity contract\n- Subgraph\n- UI (dApp)\n\n## Subgraph\n\nFollow the instructions in our [Getting Started Guide](https://github.com/graphprotocol/graph-node/blob/master/docs/getting-started.md) to learn more about subgraphs and how to create one.\n\n## UI\n\n- This project is set up using `react-scripts`\n- We use [Prisma](https://www.prisma.io/) to mock a GraphQL server. Connection to the Prisma endpoint is achieved though Apollo Client in [`src/apollo.js`](src/apollo.js).\n- Example components can be found in [`src/components/`](src/components/)\n- An example GraphQL schema can be found in [`src/domain/schema.graphql`](src/domain/schema.graphql)\n\n## Installation\n\nIn order to run this project and get events from the blockchain, we need to install a couple of tools.\n\n1.  [Truffle](https://truffleframework.com/docs/truffle/overview):\n\n    - `$ npm install -g truffle@beta` (or `$ yarn global add truffle@beta`)\n\n2.  [Ganache](https://truffleframework.com/docs/ganache/overview)\n\n    - `$ npm install -g ganache-cli` (or `$ yarn global add ganache-cli`)\n\n3.  [IPFS](https://docs.ipfs.io/introduction/install/) - please follow instructions in their docs\n\n4.  [PostgreSQL](https://www.postgresql.org/download/) - install Postgres and create a database for this project by running:\n\n    - `createdb scaffold`\n\n## Development\n\nOpen 7 terminal tabs, and follow the steps in each tab:\n\n1.  Run `$ ganache-cli`\n\n2.  Make sure you are inside of the ethereum folder and run `$ truffle compile` followed by `$ truffle migrate`. Copy the contract address and paste it inside of the `subgraph.yaml` under `address`.\n\n3.  Make sure you are inside of the ui folder and then you can run the following:\n\n    - `yarn` to install dependencies\n    - `yarn start` to serve the UI code on http://localhost:3000\n\n4.  Run `$ ipfs daemon`\n\n5.  Clone the `graph-node` repository from [here](https://github.com/graphprotocol/graph-node)\n\n6.  Go to the `graph-node` repo that you cloned, and pull from the newest `master` branch. Run the following command using the subgraph ID from the previous step:\n\n```\ncargo run -p graph-node --release -- \\\n  --postgres-url postgresql://\u003cUSERNAME\u003e@localhost:5432/scaffold \\\n  --ethereum-rpc \u003cNETWORK_NAME\u003e:http://127.0.0.1:8545 \\\n  --ipfs 127.0.0.1:5001 \\\n  --debug\n```\n\n**Note:** Try your OS username as `\u003cUSERNAME\u003e` and anything except for the mainnet as `\u003cNETWORK_NAME\u003e` (for example, `ganache` or `testnet`)\n\nThis will spin up a GraphQL interface at `http://localhost:8000` so you can run your queries against the blockchain.\n\n7.  Make sure you are inside of the subgraph folder, and run `yarn` followed by `yarn create-subgraph` and then `yarn deploy`. It will deploy the subgraph to `graph-node` and watch for changes.\n\n**NOTE**: You can find these instructions [here](https://www.notion.so/thegraph/Truffle-and-Ganache-Workflow-e3938e9e68fd47c6815855c7d321ab90) too.\n\n## License\n\nCopyright © 2018 Graph Protocol, Inc.\n\nLicensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fhackathon-scaffold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphprotocol%2Fhackathon-scaffold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fhackathon-scaffold/lists"}