We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
B256
u8
B256([u8;32])
Hi @recmo are you open to replacing current B types that are aliases for U with [u8;32], we will do the legwork if you approve it.
B
U
Current B types in revm that i need are made with primitive-types macros and have some From/Serde added to them: https://github.com/bluealloy/revm/blob/afc30663270f77df9b4399ad9d4cfb0ad2b814ec/crates/primitives/src/bits.rs#L4-L21
primitive-types
This would make a lot of projects be able to directly import ruint: ethers, reth, foundry, revm.
The text was updated successfully, but these errors were encountered:
B256([u8,32])
It's easy to get a &[u8;N] view on Uint using .as_le_slice(), from_le_bytes or even .as_le_slice_mut(). Does that solve the problem?
&[u8;N]
Uint
.as_le_slice()
from_le_bytes
.as_le_slice_mut()
Note that this requires a little-endian architecture (which is basically universal).
Sorry, something went wrong.
It's easy to get a &[u8;N] view on Uint using .as_le_slice(), from_le_bytes or even .as_le_slice_mut(). Does that solve the problem? Note that this requires a little-endian architecture (which is basically universal).
Yeah, but most crypto libs work with big endian it is kinda expected for hash/bits to be in that format, I should have started with that.
No branches or pull requests
Hi @recmo are you open to replacing current
B
types that are aliases forU
with [u8;32], we will do the legwork if you approve it.Current B types in revm that i need are made with
primitive-types
macros and have some From/Serde added to them:https://github.com/bluealloy/revm/blob/afc30663270f77df9b4399ad9d4cfb0ad2b814ec/crates/primitives/src/bits.rs#L4-L21
This would make a lot of projects be able to directly import ruint: ethers, reth, foundry, revm.
The text was updated successfully, but these errors were encountered: