Skip to main content

Data flow

In order to start indexing all whitelisted Lockup contracts we need a genesis event. With Sablier V2, there is no factory pattern so we couldn't rely on a data source contract. The next best things for a "genesis" point were:

  1. Relying on the Comptroller whitelisting the first contract
  2. Relying on the first event triggered by the earliest registered on-chain contract

To reduce the number of dependencies required to kickstart a subgraph, we chose to rely on the second approach. Therefore, when setting up a deployment, you'll need to follow a few rules.

core/src/constants/chains/goerli.ts
export let chainId = 5;
export let chain = "goerli";
export let startBlock = 9283515;

/**
* Keep aliases unique and always in sync with the frontend
* Keep addresses unique and lowercased
* @example export let linear = [[address1, alias2], [address2, alias2]]
*/

export let linear: string[][] = [["0x6e3678c005815ab34986d8d66a353cd3699103de", "LL"]];

export let dynamic: string[][] = [["0x4be70ede968e9dba12db42b9869bec66bedc17d7", "LD"]];

/** PRBProxy registry */
export let registry = "0xd42a2bb59775694c9df4c7822bffab150e6c699d";

/**
* The initializer contract is used to trigger the indexing of all other contracts.
* It should be a linear contract, the oldest/first one deployed on this chain.
*/

export let initializer = linear[0][0];