Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.98 KB

File metadata and controls

73 lines (50 loc) · 1.98 KB

ENS Substream Powered Subgraph

This substream is a start at building out an ENS SPS, based on the current version of the ENS Subgraph.

Quickstart

1. Install Dependencies & Authentication

Make sure you have the latest versions of the following installed:

Follow the authentication instructions here.

Ensure that substreams CLI works as expected:

substreams -v
substreams version 1.1.9 (Commit 7ff8bd0, Built 2023-07-24T17:05:07Z)

Note Your version may differ.

2. Compile the Project with make build

We now need to recompile our WASM binary with the new changes we made to the rust files.

3. Pack the spkg with make pack

We need to bundle the protobuf definitions and the WASM binary into a single file. This is what we will deploy the subgraph.

4. Deploy the subgraph with graph deploy <SUBGRAPH>

Tweak the subgraph parameter for your setup.

7. Schema

Schema is based upon the ENS subgraph schema. It should follow this exactly a Subgraph to SPS migration will not cause any issues.

type Domain @entity {
  id: ID!
  name: String
  labelName: String
  labelhash: Bytes
}

type NameTransferred @entity {
  id: ID!
  tokenId: String!
  blockNumber: BigInt!
  transactionID: Bytes!
  owner: String!
}

8. Data Flow

graph TD;
  map_domain[map: map_domain];
  sf.ethereum.type.v2.Block[source: sf.ethereum.type.v2.Block] --> map_domain;
  map_transfer[map: map_transfer];
  sf.ethereum.type.v2.Block[source: sf.ethereum.type.v2.Block] --> map_transfer;
  graph_out[map: graph_out];
  map_domain --> graph_out;
  map_transfer --> graph_out;

Loading