Skip to content

Is it possible to use PRBMath V3 as a library instead of a type? #143

Closed Answered by PaulRBerg
partylikeits1983 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Alex, I'm afraid that it is not possible to use PRBMath V3 as a library. V3 is a major release (according to the semver definition), and so it includes breaking changes.

As per the release notes and the announcement thread on Twitter, I have deliberately refactored the library to use only user defined value types and free functions instead of the library syntax. I did this because using the SD59x18 type instead of int256 is much less of a footgun for end users, because it forces them to handle the fixed-point types separately (see this comparison I made between V2 and V3).

As a short term solution, what you could do is stick with the v2.5.0 release, noting that the v2.x trunk will not …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PaulRBerg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #143 on November 29, 2022 20:33.