Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Jun 4, 2024

  1. 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 committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    af737a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16cee6b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c4a60a4 View commit details
    Browse the repository at this point in the history
  4. - 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 committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    0f316fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    61d7d72 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. - Added a method to get the most significant bit of the abs part of

      int256
    - Updated readMe with some usage examples
    0xsimulacra committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    741840a View commit details
    Browse the repository at this point in the history
  2. added json marshaling/unmarshling example

    0xsimulacra committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    5a96414 View commit details
    Browse the repository at this point in the history