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

Utilizing [async_]simple_cache_middleware to remove chainids mapping #63

Open
DefiDebauchery opened this issue Feb 16, 2023 · 2 comments

Comments

@DefiDebauchery
Copy link
Contributor

DefiDebauchery commented Feb 16, 2023

Building off of #62, one thing that web3py supports in both sync and async versions is the caching of chainids by using the simple_cache_middleware.

Would it be an overreach to modify the default middlewares in utils.py and remove the internal mapping, where users will simply have to ensure they're using it (unless we want to check in utils and add it in a similar fashion as ClientTimeout)?

@BobTheBuidler
Copy link
Collaborator

How far back does this support go? I like that multicall is able to work with some older versions of web3 as well and would prefer to keep that wide of a range if we can.

You can go ahead and implement this so long as we're able to maintain support for all currently supported web3 versions.

@BobTheBuidler
Copy link
Collaborator

It does seem a bit unnecessary imo but if you throw it together I'll take a look and merge it in if it works as we want

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