Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for multi chain indexing #329

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

Sekhmet
Copy link
Contributor

@Sekhmet Sekhmet commented Jan 14, 2025

Summary

Few forced changes for consumers:

  • ORM now requires indexer to be specified to know which indexer entity belongs to.
  • Things had to move around CheckpointConfig, CheckpointsOptions and OverridesConfig (new, used for database options, like decimals as it needs static config for ORM).
const mainnetConfig = createConfig('mainnet');
const sepoliaConfig = createConfig('sepolia');

const mainnetIndexer = new starknet.StarknetIndexer(createStarknetWriters('mainnet'));
const sepoliaIndexer = new starknet.StarknetIndexer(createStarknetWriters('sepolia'));

const checkpoint = new Checkpoint(schema, {
  logLevel: LogLevel.Info,
  prettifyLogs: true
});

checkpoint.addIndexer('mainnet', mainnetConfig, mainnetIndexer);
checkpoint.addIndexer('sepolia', sepoliaConfig, sepoliaIndexer);

Test plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant