-
Notifications
You must be signed in to change notification settings - Fork 75
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 acceptance tests for cryptoTransfer function #485
Conversation
Signed-off-by: lukelee-sl <[email protected]>
Signed-off-by: lukelee-sl <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #485 +/- ##
=======================================
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. |
Signed-off-by: lukelee-sl <[email protected]>
Here are some results after some exploration.
|
Signed-off-by: lukelee-sl <[email protected]>
Signed-off-by: lukelee-sl <[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.
Some suggestions
There are a couple of problems with the setup:
I'm not sure why the transferFrom functions were not exposed to HTS precompile top-level like the other functions from ERC20 and ERC721 were with PR3638. In any case, the cryptoTransfer function will not work with allowances.
For context, we have existing EETs covering the transfer of tokens (including mixing fungible and nfts) via cryptoTransfer here. |
Signed-off-by: lukelee-sl <[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
Signed-off-by: lukelee-sl <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Signed-off-by: lukelee-sl [email protected]
Description:
hashgraph/hedera-services#3758
The issue referenced above in hedera-services describes several scenarios where using the cryptoTransfer function fails.
Currently, cryptoTransfer succeeds only when the token type being transferred is of homogenous (fungible -> fungible or nft -> nft). Also there is no support for sending hbars as one of the legs of the transfer.
Added several acceptance tests to show use cases where the function succeeds and also when it fails due to heterogeneous token types.
Related issue(s):
hashgraph/hedera-services#3758
Notes for reviewer:
Checklist