-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversion utilities #14
base: master
Are you sure you want to change the base?
Commits on Jun 4, 2024
-
Added utilities to convert from/to Decimal(string), Hex, Text and Json:
- FromDecimal() will accept a string in the form of "-1123" or "1235" - Dec() will transform to a string to its decimal refresentation "1234" or "-234" - String() now internaly use Dec() method - FromHex() will accept a string in the form of "0x12fe" or "-0x23fd" - ToHex() will transform to a string in the form of "0x.." or "-0x.." - MarshalText: implements encoding.TextMarshaler - UnmarshalText: implements encoding.TextUnmarshaler - MarshalJSON: implements json.Marshaler. - UnmarshalJSON: implements json.Unmarshaler
0xsimulacra committedJun 4, 2024 Configuration menu - View commit details
-
Copy full SHA for af737a2 - Browse repository at this point
Copy the full SHA af737a2View commit details -
added a test case for the minimum value for Test Decimal and Hex
0xsimulacra committedJun 4, 2024 Configuration menu - View commit details
-
Copy full SHA for 16cee6b - Browse repository at this point
Copy the full SHA 16cee6bView commit details -
removed an ineffectual assignment that made go linter print errors
0xsimulacra committedJun 4, 2024 Configuration menu - View commit details
-
Copy full SHA for c4a60a4 - Browse repository at this point
Copy the full SHA c4a60a4View commit details -
- Corrected and cleaned go.mod that got modifed by local toolchain
- Forgot to mention that in these new commits I upgraded uint256 to its latest version
0xsimulacra committedJun 4, 2024 Configuration menu - View commit details
-
Copy full SHA for 0f316fe - Browse repository at this point
Copy the full SHA 0f316feView commit details -
Hex() no longer return '<nil>' if z.abs is nil, instantiate it instead
0xsimulacra committedJun 4, 2024 Configuration menu - View commit details
-
Copy full SHA for 61d7d72 - Browse repository at this point
Copy the full SHA 61d7d72View commit details
Commits on Jun 5, 2024
-
- Added a method to get the most significant bit of the abs part of
int256 - Updated readMe with some usage examples
0xsimulacra committedJun 5, 2024 Configuration menu - View commit details
-
Copy full SHA for 741840a - Browse repository at this point
Copy the full SHA 741840aView commit details -
added json marshaling/unmarshling example
0xsimulacra committedJun 5, 2024 Configuration menu - View commit details
-
Copy full SHA for 5a96414 - Browse repository at this point
Copy the full SHA 5a96414View commit details