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/sepolia.ts
export let chainId = 11155111;
export let chain = "sepolia";
export let startBlock = 9283515;

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

export let lockupLinear: string[][] = [["0x7a43F8a888fa15e68C103E18b0439Eb1e98E4301", "LL2"]];

export let lockupDynamic: string[][] = [["0xc9940AD8F43aAD8e8f33A4D5dbBf0a8F7FF4429A", "LD2"]];

/**
* 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];