-
Notifications
You must be signed in to change notification settings - Fork 14
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: Add corelib types #30
Conversation
Add a fully featured U256 type
This reverts commit 2a75052.
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.
Amazing @piniom. 🔥
Like this the fact that U256
exposes the bytes, we're sure that any library can just easily interact with cainome without being too opinionated.
Only the
use cainome::cairo_serde::U256;
Into the simple_get_set.rs
test missing.
}; | ||
assert_eq!(U256::cairo_serialized_size(&u256), 2); | ||
} | ||
#[test] |
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.
Could we space the tests for easier paragraph navigation?
The goal of this PR is twofold:
NonZero
type to the cainome repo. The type will be restricted to hold integers only.fn to_bytes_be(&self) -> [u8, 32];
on the type and allow it to be used with the newNonZero
type.