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

We should allow passing protocol parameters in the constructor to avoid calling the provider #18

Open
joacohoyos opened this issue Dec 26, 2023 · 1 comment

Comments

@joacohoyos
Copy link
Contributor

Some dapps might want to optimize the Protocl params fetching to avoid calling the provider endpoints each time you instantiate Translucent.

Translucent.new could be modified to new(provider, network, protocolParams) to allow passing the protocol parameters and that would avoid calling provider.getProtocolParamateres

@micahkendall
Copy link
Member

yep. Maybe a cooler way to do this would be making providers composable so you can layer a provider that you build for your dApp over others. Lots of dApps need very specific fetching of data so I think this would be an important pattern that solves the same issue.

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

No branches or pull requests

2 participants