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

1110 class HexUInt #1149

Merged
merged 10 commits into from
Aug 9, 2024
Merged

1110 class HexUInt #1149

merged 10 commits into from
Aug 9, 2024

Conversation

lucanicoladebiasi
Copy link
Contributor

@lucanicoladebiasi lucanicoladebiasi commented Aug 9, 2024

Description

The code introduces the HexUInt class to represent in hexadecimal notation unsigned integers.
This is the super class of next classes of the VeChain Data Model like Address and Hash.

The class Hex provides the .abs property to get the absolute value as new Hex instance of its value.

The package packages/core/src/utils/hex providing the functional constants Hex, Hex0x and Quantity is removed successfully.

Please, use Hex class and its extensions to deal with hexadecimal expressions of values, prefer the forms -0x... and 0x... in literals.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • yarn test:examples
  • yarn test:solo.
  • [ x] yarn test:unit.

Test Configuration:

  • Node.js Version: v20.14.0
  • Yarn Version: 1.22.22

Checklist:

  • My code follows the coding standards of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing integration tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

Copy link

github-actions bot commented Aug 9, 2024

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 99%
99.32% (3538/3562) 97.51% (943/967) 99.28% (696/701)
Title Tests Skipped Failures Errors Time
core 499 0 💤 0 ❌ 0 🔥 1m 5s ⏱️
network 683 0 💤 0 ❌ 0 🔥 3m 54s ⏱️
errors 40 0 💤 0 ❌ 0 🔥 13.237s ⏱️

# Conflicts:
#	packages/core/src/vcdm/Hex.ts
#	packages/core/src/vcdm/HexInt.ts
#	packages/core/src/vcdm/index.ts
@lucanicoladebiasi lucanicoladebiasi marked this pull request as draft August 9, 2024 09:17
@lucanicoladebiasi lucanicoladebiasi marked this pull request as ready for review August 9, 2024 09:23
@lucanicoladebiasi lucanicoladebiasi marked this pull request as draft August 9, 2024 10:58
@freemanzMrojo freemanzMrojo removed their request for review August 9, 2024 11:21
@lucanicoladebiasi lucanicoladebiasi marked this pull request as ready for review August 9, 2024 11:34
@fabiorigam fabiorigam merged commit 773b6f1 into main Aug 9, 2024
12 checks passed
@fabiorigam fabiorigam deleted the 1110-class-HexUInt branch August 9, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants