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

[Feature] Introduce alloy-compat #1285

Open
aatifsyed opened this issue Sep 13, 2024 · 0 comments
Open

[Feature] Introduce alloy-compat #1285

aatifsyed opened this issue Sep 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aatifsyed
Copy link

Component

meta-crate

Describe the feature you would like

I've written alloy-compat, which allows convertions between alloy and ethereum_types types:

use alloy_compat::Compat as _;

// from alloy to ethereum_types
let address = alloy::address!("deadbeefdeadbeefdeadbeefdeadbeef00000000");
let _: eth::Address = address.compat();

// from ethereum_types to alloy
let hash = eth::H256::zero();
let _: alloy::B256 = hash.compat();

// integers are supported
let int = eth::U128::MAX;
assert_eq!(alloy::U128::MAX, int.compat());

Might be useful to fold it in here - this issue is for guaging your interest in that

Additional context

No response

@aatifsyed aatifsyed added the enhancement New feature or request label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant