Skip to content

feat: resolve #12, add client caching and lazy evaluation - #22

Open
Soham-ent wants to merge 1 commit into
euler-xyz:masterfrom
Soham-ent:feat/chainlink-summary
Open

feat: resolve #12, add client caching and lazy evaluation#22
Soham-ent wants to merge 1 commit into
euler-xyz:masterfrom
Soham-ent:feat/chainlink-summary

Conversation

@Soham-ent

Copy link
Copy Markdown

Closes #12.

While adding the Chainlink summary generation, I noticed a few areas in the data pipeline that could be optimized for local development and memory usage.

  • Generalized the Pyth summary logic using a 'providerSummaries' config to automatically support Chainlink, Chronicle, RedStone, etc.
  • Added a 'clientCache' map to 'getClient.ts' to memoize Viem instances and prevent redundant client instantiations.
  • Switched 'publicClient' in 'chainConfigs.ts' to use getters for lazy evaluation. This prevents local environments from crashing on startup if a developer is missing a specific network's 'RPC_URL' in their '.env'.

Tested locally against mainnet.

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.

we only summarise all pyth adaptors like /pyth/all.json we need to do it for chainlink as well

1 participant