-
Notifications
You must be signed in to change notification settings - Fork 68
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
eth_getLogs #103
eth_getLogs #103
Conversation
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
# Conflicts: # packages/relay/src/index.ts # packages/relay/src/lib/eth.ts # packages/relay/tests/lib/eth.spec.ts
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
# Conflicts: # packages/relay/src/index.ts # packages/relay/src/lib/model.ts # packages/server/tests/server.spec.ts
Signed-off-by: Ivo Yankov <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 60.84% 66.53% +5.68%
==========================================
Files 4 4
Lines 424 490 +66
Branches 56 66 +10
==========================================
+ Hits 258 326 +68
+ Misses 151 147 -4
- Partials 15 17 +2
Continue to review full report at Codecov.
|
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.
Some improvement suggestion of result build and request for 2 minor non happy path tests
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[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.
One nit.
packages/relay/tests/lib/eth.spec.ts
Outdated
|
||
describe('eth_getLogs', async function () { | ||
|
||
const expectLogData1 = (res) => { |
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.
nit: A few shared checks in here can be pulled out.
const expectLogData = (res) => {
expect(res.blockHash).to.eq(defaultDetailedContractResults.block_hash);
expect(res.blockNumber).to.eq(defaultDetailedContractResults.block_number);
expect(res.removed).to.eq(false);
expect(res.topics).to.exist;
expect(res.transactionHash).to.eq(defaultDetailedContractResults.hash);
expect(res.transactionIndex).to.eq(defaultDetailedContractResults.transaction_index);
};
Then each expectLogDataX(res)
can call expectLogData(res)
Signed-off-by: Ivo Yankov <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description:
Related issue(s):
Fixes #
#20
Notes for reviewer:
Checklist