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

feat(TCK): Add AccountCreate method #2476

Merged
merged 6 commits into from
Aug 28, 2024
Merged

Conversation

ivaylogarnev-limechain
Copy link
Contributor

Description:
This PR implements the TCK JSON-RPC server using TypeScript. Developed and integrated the AccountCreate method, and successfully validated its functionality through comprehensive tests within the TCK project.

Related issue(s):
#2433

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ivaylogarnev-limechain ivaylogarnev-limechain requested review from a team as code owners August 22, 2024 09:15
@ivaylogarnev-limechain ivaylogarnev-limechain changed the title feat: Added TCK server json-rpc methods for account create transaction feat(TCK): Add AccountCreate method Aug 22, 2024
tck/models/account-key.ts Outdated Show resolved Hide resolved
tck/models/account-key.ts Outdated Show resolved Hide resolved
tck/models/sdk.ts Outdated Show resolved Hide resolved
tck/models/sdk.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/utils/common-tx-params.ts Outdated Show resolved Hide resolved
…moved some functions outside Key method.

Signed-off-by: ivaylogarnev-limechain <[email protected]>
tck/methods/account.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/server.ts Show resolved Hide resolved
tck/utils/key.ts Outdated Show resolved Hide resolved
tck/server.ts Outdated Show resolved Hide resolved
tck/server.ts Outdated Show resolved Hide resolved
tck/server.ts Outdated Show resolved Hide resolved
tck/mapping.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
tck/methods/key.ts Outdated Show resolved Hide resolved
@ivaylonikolov7
Copy link
Contributor

Btw the DCO fails. I would recommend you to sign it now so you wouldn't have to do some git gymnastics to sign non-last commits.

…ed account method

Signed-off-by: ivaylogarnev-limechain <[email protected]>
@ivaylogarnev-limechain ivaylogarnev-limechain force-pushed the feat/2433-tck-account-create branch from d6cbbae to 263ec3d Compare August 27, 2024 09:42
0xivanov
0xivanov previously approved these changes Aug 27, 2024
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

tck/server.ts Outdated Show resolved Hide resolved
tck/server.ts Outdated Show resolved Hide resolved
tck/methods/sdk.ts Outdated Show resolved Hide resolved
tck/server.ts Outdated Show resolved Hide resolved
tck/utils/key.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@ivaylonikolov7 ivaylonikolov7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT!

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.82%. Comparing base (17a8ee9) to head (b7c3c9b).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2476   +/-   ##
=======================================
  Coverage   75.82%   75.82%           
=======================================
  Files         237      237           
  Lines       60072    60072           
=======================================
  Hits        45552    45552           
  Misses      14520    14520           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ivaylonikolov7
Copy link
Contributor

btw I just noticed that one of the commits isn't signed. The DCO passes but when we merge to main there is going to be a problem.

…processKeyRecursively method

Signed-off-by: ivaylogarnev-limechain <[email protected]>
@ivaylogarnev-limechain ivaylogarnev-limechain force-pushed the feat/2433-tck-account-create branch from b7c3c9b to 8c53c25 Compare August 28, 2024 07:28
…stom enum, refactored getEvmAddressFromKey, getKeyFromString, handleEd25519andEcdsa methods and SDK setup

Signed-off-by: ivaylogarnev-limechain <[email protected]>
@ivaylogarnev-limechain ivaylogarnev-limechain force-pushed the feat/2433-tck-account-create branch from 8c53c25 to 8499ef6 Compare August 28, 2024 08:01
Copy link

sonarcloud bot commented Aug 28, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

@0xivanov 0xivanov merged commit 8885cf3 into main Aug 28, 2024
12 of 13 checks passed
@0xivanov 0xivanov deleted the feat/2433-tck-account-create branch August 28, 2024 12:44
@ivaylonikolov7 ivaylonikolov7 mentioned this pull request Sep 12, 2024
ivaylogarnev-limechain added a commit that referenced this pull request Sep 19, 2024
* feat: Added TCK server json-rpc methods for account create transaction

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* fix: Renamed some interfaces, refactored processKeyRecursively func, moved some functions outside Key method.

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* fix: Splitted models folder into params/response and renamed the Input interface

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* fix: Removed unnecessary async, introduced CustomError class, refacoted account method

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* refactor: Removed logs, unnecessary error handling logic, refactored processKeyRecursively method

Signed-off-by: ivaylogarnev-limechain <[email protected]>

* refactor: Introduced asn1DecodedKey interface and JSONRPCErrorCode custom enum, refactored getEvmAddressFromKey, getKeyFromString, handleEd25519andEcdsa methods and SDK setup

Signed-off-by: ivaylogarnev-limechain <[email protected]>

---------

Signed-off-by: ivaylogarnev-limechain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TCK-JS: Implement JSON-RPC methods for AccountCreateTransaction
3 participants