-
Notifications
You must be signed in to change notification settings - Fork 79
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
Support for alloy_primitive int types #137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just pending the overflow check
pub struct SolInt<const BITS: usize, const LIMBS: usize>; | ||
|
||
impl<const BITS: usize, const LIMBS: usize> AbiType for Signed<BITS, LIMBS> | ||
where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the most hardcore generic constraint I've seen 😅, great job on getting it to work
stylus-sdk/src/abi/ints.rs
Outdated
let (head, _tail) = slice.split_at(TL); | ||
let mut limbs = [0; TL]; | ||
limbs.copy_from_slice(head); | ||
/* TODO overflow check needed? |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
e710cd7
to
0116de8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Support for alloy_primitives::Signed and alloy_primitives::Uint in return types and parameters.
TODO
Still in draft as I finish up the following tasks:
Checklist