-
Notifications
You must be signed in to change notification settings - Fork 2
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
Math contract #55
Comments
I've searched for math & cryptographic crates that don't require std lib. Here's some of more interesting libraries:
Those crates should cover everything OpenZeppelin implements in its Math & Cryptography modules. Therefore I think math specific contracts are not required. |
It would be interesting to check how many of those works in the soroban runtime 🤔 I would probably defer the decision on this for the moment and wait for the need of them. As we are going to build an entire catalog of contracts. wdyt ? |
We may need to think more about unchecked math.
Is this the behavior we want? |
I would say that yes. By reading the docs i understand that if we are careful and use the
|
Wouldn't rather work in our case? There is also this num_traits crate which can handle over/under flows |
Can we close this issue? |
This research should answer the question whether a specific contract (or contracts) implementing the math functionality (similar to OpenZeppelin one) would be needed. Currently Rust supports already a lot of math functions, e.g. this non-std lib: https://crates.io/crates/libm
The text was updated successfully, but these errors were encountered: