-
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
fix: fixed eth_getCode to now use blockNumber when address is an HTS token #3433
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Simeon Nakov <[email protected]>
Test Results 22 files ± 0 278 suites +7 44m 6s ⏱️ - 21m 37s For more details on these failures, see this check. Results for commit 7a9e00b. ± Comparison against base commit 373f1dc. This pull request removes 3 and adds 15 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
packages/relay/src/lib/services/ethService/ethCommonService/index.ts
Outdated
Show resolved
Hide resolved
packages/relay/src/lib/services/ethService/ethCommonService/index.ts
Outdated
Show resolved
Hide resolved
…ests + acceptance tests Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
@acuarica please kindly take a look when you have a chance to see if it meet yoru original requirements. Thanks much! |
throw predefined.UNKNOWN_BLOCK(`Block number ${blockNumber} does not exist`); | ||
} | ||
|
||
const tokenId = Utils.addressToTokenId(address); |
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.
This assumes address
is a long zero address, right?
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.
Correct
…d on tests Signed-off-by: Simeon Nakov <[email protected]>
Signed-off-by: Simeon Nakov <[email protected]>
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3433 +/- ##
==========================================
- Coverage 85.20% 84.45% -0.76%
==========================================
Files 69 69
Lines 4711 4772 +61
Branches 1048 1064 +16
==========================================
+ Hits 4014 4030 +16
- Misses 397 428 +31
- Partials 300 314 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
If we pass an HTS token address to getCode, we do not take into account the block number, resulting in a bug where it would return the smart contract code even if the block number provided is earlier than the one where the token was created.
Related issue(s):
Fixes #3155
Notes for reviewer:
Checklist