snapshot-labs / snapshot-hub

GraphQL API for Snapshot
https://hub.snapshot.org/graphql
MIT License
103 stars 194 forks source link
Snapshot Logo

Snapshot hub

This is a hub for Snapshot network that stores the database and forwards new messages to peers. The hub holds a private key to sign valid messages.


GitHub commit activity GitHub issues help wanted Telegram Discord Twitter

Install

  1. Install Node.js, clone the repository, then say:
yarn
  1. Copy .env.example, rename it to .env and set a value for these config vars:
  1. Create the database schema

Run this query on the MySQL database to create the initial schema with the required tables: https://github.com/snapshot-labs/snapshot-hub/blob/master/src/helpers/schema.sql

Run

yarn start
{
  "name": "snapshot-hub",
  "network": "livenet",
  "version": "0.1.3",
  "tag": "alpha",
  "relayer": "0x8BBE4Ac64246d600BC2889ef5d83809D138F03DF"
}

Load a space setting

To load a space settings in the database you can go on this endpoint http://localhost:3000/api/spaces/yam.eth/poke (change yam.eth with the space you want to activate).

License

Snapshot is open-sourced software licensed under the © MIT license.