All packages
uniswap-governance

uniswap-governance

Aaditya-G
v0.1.0/38 downloads/Repository

Package ref

uniswap-governance@v0.1.0

Run package

CLI

Run graph_out from the command line.

substreams run uniswap-governance@v0.1.0 graph_out --start-block -1
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

Uniswap Governance Substream

A high-performance, production-ready Substream for indexing Uniswap Governance proposals and votes on the Ethereum Mainnet.

This module provides a clean, reliable data feed that can be used to power a Subgraph or any other data sink, providing a significant speed advantage over traditional indexing methods.

Features

  • Tracks ProposalCreated events: Captures proposal ID, proposer, description, and creation time.
  • Tracks VoteCast events: Captures voter, weight, choice (For, Against, Abstain), and the vote reason.
  • Outputs EntityChanges: Ready to be consumed directly by a Substream-powered subgraph.

Quickstart: Using This Substream

To use this Substream as a module in your own project (e.g., to power a subgraph), add the following to your substreams.yaml manifest:

imports:
  uniswap_governance: https://spkg.io/your-username/your-substream-name-v0.1.0.spkg

modules:
  - name: my_downstream_module
    kind: map
    inputs:
      - map: uniswap_governance:graph_out
    output:
      # ... your logic here

The primary output module is graph_out, which emits sf.substreams.entity.v1.EntityChanges.

Development & Setup

Prerequisites

Commands

  1. Build the Wasm Module:

    cargo build --release --target wasm32-unknown-unknown
    
  2. Package the Substream:

    substreams pack
    
  3. Test the Output (Optional):

    substreams run -e mainnet.eth.streamingfast.io:443 substreams.yaml graph_out --start-block 13059157 --stop-block +1000
    

Modules

Execution graph

3 modules