---
# System prepended metadata

title: DAOStack SignalScheme

---

# DAOStack SignalScheme

## Proposal

https://github.com/daostack/Ecosystem/blob/master/proposals/signal-scheme-mvp-proposal.md

## Repositories

- Subgraph (backend) : https://github.com/apeunit/subgraph/tree/signalscheme
    - PR: https://github.com/daostack/subgraph/pull/427
- Deployed Version:
    - Subgraph: https://thegraph.com/explorer/subgraph/shekhar-shubhendu/signal-scheme-one
    - Tracked Address: `0xe06d896da40b73cb02650220e480e20f38e7be18`
    - DAO on Rinkeby with attached address: https://alchemy-staging-rinkeby.herokuapp.com/dao/0x6df3850cae46adfac3c254d9bd598d5f68706a0a
    - Query to fetch Signals:
    ```json
    {
      signals {
        id  // DAO Avatar ID
        data
      }
    }
    ```

- Alchemy (frontend): https://github.com/apeunit/alchemy/tree/feat/signalSchemes
    - PR: https://github.com/daostack/alchemy/pull/1285

## Deploying the Subgraph

1. Install Graph CLI
    https://thegraph.com/docs/define-a-subgraph#install-the-graph-cli
2. thegraph account and subgraph creation
    2.1 https://thegraph.com/docs/deploy-a-subgraph#create-a-graph-explorer-account
    2.2 https://thegraph.com/docs/deploy-a-subgraph#store-the-access-token
    2.3 https://thegraph.com/docs/deploy-a-subgraph#create-the-subgraph
3. Clone the repo and install the dependencies
    ```
    git clone git@github.com:apeunit/subgraph.git --branch=signalscheme
    cd subgraph
    npm install
    ```
4. Run command to generate required files for deployment
    ```
    network=rinkeby npm run codegen
    ```
    you can use a different `network` if required.  
5. Update the generated `subgraph.yaml`
    There are 2 things that are of interest here,
        1. `startBlock` for every contract this is initially set to 0 and if you do not want the graph to scall the entire blockchain you can provide the appropriate block number i.e. for the new deployment where old data is of no interest this can be set to the latest block height.
        2. Address of the `NewSignalScheme`: If you want to update it you can update it here. Currently, there is a default value set for `rinkeby` only in `ops/mappings.json`.
        Note: In an ideal world, this value should come from `@daostack/migrations` 
6. Finally deploy using the below command
    ```
    graph deploy \                 
    --debug \
    --node https://api.thegraph.com/deploy/ \
    --ipfs https://api.thegraph.com/ipfs/ \
    <github-username>/<subgraph-name>
    ```

