-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add HTS Precompile tests for token check methods #468
Add HTS Precompile tests for token check methods #468
Conversation
Signed-off-by: nikolay <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Some clarifying suggestions.
Once addressed please move PR to draft.
Let's wait on services tag before checking this PR in.
const tokenType = txReceipt.events.filter(e => e.event === 'TokenType')[0].args.tokenType; | ||
expect(tokenType).to.equal(0); | ||
}); | ||
it('should returns 1 for getTokenType with passed HTS nft token', async function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('should returns 1 for getTokenType with passed HTS nft token', async function() { | |
it('should return 1 for getTokenType with passed HTS nft token', async function() { |
const tokenType = txReceipt.events.filter(e => e.event === 'TokenType')[0].args.tokenType; | ||
expect(tokenType).to.equal(1); | ||
}); | ||
it('should throws an exception for getTokenType with passed contract address', async function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('should throws an exception for getTokenType with passed contract address', async function() { | |
it('should throw an exception for getTokenType with passed contract address', async function() { |
const isTokenFlag = txReceipt.events.filter(e => e.event === 'IsToken')[0].args.isToken; | ||
expect(isTokenFlag).to.equal(true); | ||
}); | ||
it('should returns 0 for getTokenType with passed HTS token', async function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('should returns 0 for getTokenType with passed HTS token', async function() { | |
it('should returns 0 for getTokenType with passed FUNGIBLE_COMMON token', async function() { |
const tokenType = txReceipt.events.filter(e => e.event === 'TokenType')[0].args.tokenType; | ||
expect(tokenType).to.equal(0); | ||
}); | ||
it('should returns 1 for getTokenType with passed HTS nft token', async function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('should returns 1 for getTokenType with passed HTS nft token', async function() { | |
it('should returns 1 for getTokenType with passed HTS NON_FUNGIBLE_UNIQUE token', async function() { |
Signed-off-by: nikolay <[email protected]>
Codecov ReportBase: 76.38% // Head: 76.38% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #468 +/- ##
=======================================
Coverage 76.38% 76.38%
=======================================
Files 12 12
Lines 923 923
Branches 144 144
=======================================
Hits 705 705
Misses 165 165
Partials 53 53 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Nana Essilfie-Conduah <[email protected]>
…n-check-methods # Conflicts: # packages/server/tests/acceptance/htsPrecompile.spec.ts # packages/server/tests/contracts/BaseHTS.json # packages/server/tests/contracts/BaseHTS.sol # packages/server/tests/contracts/HederaTokenService.sol # packages/server/tests/contracts/IHederaTokenService.sol
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, please update PR description to match your changes
…n-check-methods # Conflicts: # packages/server/tests/contracts/BaseHTS.json
Signed-off-by: nikolay <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Signed-off-by: nikolay [email protected]
Description:
Add support for the token verifications:
Related issue(s):
Fixes #411
Notes for reviewer:
Checklist