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

How to import WrapDatabaseAsync #1996

Open
paulatsydney opened this issue Jan 14, 2025 · 1 comment
Open

How to import WrapDatabaseAsync #1996

paulatsydney opened this issue Jan 14, 2025 · 1 comment
Labels

Comments

@paulatsydney
Copy link

In the example uniswap_v2_usdc_swap, it creates a type as following:
pub type AlloyCacheDB = CacheDB<WrapDatabaseAsync<AlloyDB<Http, Ethereum, RootProvider<Http>>>>;

I want to follow this approach, however I can't find out how to import WrapDatabaseAsync.
In the example it simples use revm::database_interface::WrapDatabaseAsync. However in my code, database_interface doesn't exist in revm.
My REVM version is 19.3.0.

If I check the documentation, I can see that this is a pub struct. https://bluealloy.github.io/revm/docs/revm_database_interface/async_db/struct.WrapDatabaseAsync.html

Appreciate if anyone could give a help.

@rakita
Copy link
Member

rakita commented Jan 23, 2025

You would need a asyncdb feature enabled

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

No branches or pull requests

2 participants