-
Notifications
You must be signed in to change notification settings - Fork 411
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
Improve list contracts by code query #497
Conversation
Codecov Report
@@ Coverage Diff @@
## master #497 +/- ##
==========================================
- Coverage 58.45% 58.41% -0.04%
==========================================
Files 41 41
Lines 4441 4437 -4
==========================================
- Hits 2596 2592 -4
Misses 1631 1631
Partials 214 214
|
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.
Good job with the code index, and looks like a good improvement. But I don't see any migration tests here.
Can you add one that explicitly shows a different ordering based on migration vs creation?
CodeID: 1, | ||
Created: &AbsoluteTxPosition{2 + 1<<(8*7), 3 + 1<<(8*7)}, |
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.
I would keep a different Created
here just to prove it takes one and ignores the other.
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.
I have switched from ContractInfo
to ContractCodeHistoryEntry
element. Any instantiation/migration results in a new ContractCodeHistoryEntry
so that it covers both.
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.
Looking good. Thanks for that test
Resolves #323
Breaking change:
List contracts by code returns now the addresses without other data from CodeInfo
This was a gas intensive query before. Especially with the legacy rest endpoint