Skip to content

Conversation

@joefitter
Copy link
Contributor

Context:

I am working on an app which parses many transactions using codama and as part of this I need to fetch IDLs for all programs in all instructions. As the only published method for fetching and parsing program-metadata content only supports single calls this results in many getAccountInfo calls which can exceed RPC rate limits for some suppliers.

Suggestion:

The addition of fetchAndParseAllMetadataContent which uses getMultipleAccounts to prefetch all PDA accounts, and additionally fetches all external accounts in a total of 2 RPC calls instead of potentially hundreds.

multiple metadata accounts

I am working on an app which parses many transactions using codama and as part of this I need to fetch IDLs for all programs in all instructions. As the only published method for fetching and parsing program-metadata content only supports single calls this results in many getAccountInfo calls which can exceed RPC rate limits for some suppliers.

The addition of fetchAndParseAllMetadataContent which uses getMultipleAccounts to prefetch all PDA accounts, and additionally fetches all external accounts in a total of 2 RPC calls instead of potentially hundreds.
@joefitter joefitter force-pushed the feature/fetchAndParseAllMetadataContent branch from 564b30d to 31e62e4 Compare November 19, 2025 01:04
Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for PRing these changes! I've made a few comments but overall it looks good to me. Looking at CI, it looks like you have a small linting issue to fix as well. Something about return await.

Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you!

@lorisleiva lorisleiva merged commit 1c14f86 into solana-program:main Nov 24, 2025
9 checks passed
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.

2 participants