Skip to content

SoulboundLabs/subgraph-the-graph-badges

Repository files navigation

The Graph Badges

Emblem is a dApp for identifying and rewarding noteworthy behavior on the Ethereum blockchain by issuing NFT badges. This repo houses the subgraph responsible for monitoring and rewarding users within The Graph protocol. For more information, please visit our website or join our Discord.

Setup

  1. Install dependencies
npm i
  1. Start your local graph-node. If you have a M1 Macbook, please talk with us on Discord for some custom workarounds for the following steps.

    • Clone graph-node
    git clone https://github.com/graphprotocol/graph-node
    • Sign up for Alchemy and create your own Ethereum node. You can alternatively use your own Ethereum node if you have the hardware.

    • Edit your graph-node/docker/docker-compose.yml file. Change the "ethereum" environment variable to point to your Ethereum node. If you are using Alchemy, be sure to update <YOUR_API_KEY> and change <YOUR_NETWORK> to "mainnet" or "rinkeby".

    ...
    ...
    graph-node:
    ...
    ...
     environment:
       ...
       ...
       # ethereum: 'mainnet:http://host.docker.internal:8545'
       ethereum: "<YOUR_NETWORK>:https://eth-rinkeby.alchemyapi.io/v2/<YOUR_API_KEY>"
       ...
       ...
    ...
    ...
    • Start your docker processes
    docker-compose up
  2. Create your subgraph.yaml on Rinkeby or Mainent

npm run prep:addresses:rinkeby

OR

npm run prep:addresses:mainnet
  1. Generate code & build your subgraph
npm run build
  1. Deploy Locally
npm run create-local
npm run deploy-local
  1. Authenticate
graph auth  --studio <YOUR_AUTH_TOKEN_HERE>
  1. Deploy to The Graph Studio.
npm run deploy

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •