Skip to content
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

Check to parameter in eth_call method #744

Conversation

georgi-l95
Copy link
Collaborator

Signed-off-by: georgi-l95 [email protected]

Description:
Checks if to parameter is passed in eth_call method, before checking it's length.

Related issue(s):

Fixes #742

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@georgi-l95 georgi-l95 linked an issue Dec 5, 2022 that may be closed by this pull request
@georgi-l95 georgi-l95 self-assigned this Dec 5, 2022
@georgi-l95 georgi-l95 added the bug Something isn't working label Dec 5, 2022
@georgi-l95 georgi-l95 requested a review from Nana-EC December 5, 2022 16:53
@georgi-l95 georgi-l95 marked this pull request as ready for review December 5, 2022 16:53
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.
Add an eth.ts test for this case to ensure the right error is thrown

@Nana-EC Nana-EC added this to the 0.14.0 milestone Dec 5, 2022
Signed-off-by: georgi-l95 <[email protected]>
@georgi-l95
Copy link
Collaborator Author

Looking good. Add an eth.ts test for this case to ensure the right error is thrown

Added tests for no to passed and wrong to passed.

@codecov-commenter
Copy link

Codecov Report

Base: 72.53% // Head: 72.71% // Increases project coverage by +0.18% 🎉

Coverage data is based on head (31378de) compared to base (f9e0dc5).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #744      +/-   ##
==========================================
+ Coverage   72.53%   72.71%   +0.18%     
==========================================
  Files          16       16              
  Lines        1227     1228       +1     
  Branches      224      225       +1     
==========================================
+ Hits          890      893       +3     
+ Misses        279      278       -1     
+ Partials       58       57       -1     
Impacted Files Coverage Δ
packages/relay/src/lib/eth.ts 83.57% <100.00%> (+0.40%) ⬆️

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: georgi-l95 <[email protected]>
@georgi-l95 georgi-l95 requested a review from Nana-EC December 6, 2022 00:11
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@georgi-l95 georgi-l95 merged commit 1400f83 into main Dec 6, 2022
@georgi-l95 georgi-l95 deleted the 742-empty-to-parameter-in-eth_call-causes-relay-to-interrupt-deployment branch December 6, 2022 08:37
lukelee-sl pushed a commit that referenced this pull request Dec 6, 2022
Checks if to parameter is passed in eth_call method, before checking it's length.

Signed-off-by: georgi-l95 <[email protected]>
@lukelee-sl lukelee-sl modified the milestones: 0.14.0, 0.13.1 Dec 6, 2022
lukelee-sl added a commit that referenced this pull request Dec 6, 2022
* Check `to` parameter in `eth_call` method (#744)

Checks if to parameter is passed in eth_call method, before checking it's length.

Signed-off-by: georgi-l95 <[email protected]>

* eth_getBalance workaround (#717)

* feat: add workaround logic

Signed-off-by: Ivo Yankov <[email protected]>

* fix: unit tests

Signed-off-by: Ivo Yankov <[email protected]>

* chore: code cleanup

Signed-off-by: Ivo Yankov <[email protected]>

* test: add acceptance test

Signed-off-by: Ivo Yankov <[email protected]>

* chore: fix unit tests

Signed-off-by: Ivo Yankov <[email protected]>

* refactor: remove duplicated pagination util

Signed-off-by: Ivo Yankov <[email protected]>

* fix: add safeguard against double link prefix

Signed-off-by: Ivo Yankov <[email protected]>

* chore: fix acceptancetest api tests structure

Signed-off-by: Ivo Yankov <[email protected]>

* nit: code cleanup

Signed-off-by: Ivo Yankov <[email protected]>

* fix: calculate balance at block end

Signed-off-by: Ivo Yankov <[email protected]>

* fix: broken unit tests

Signed-off-by: Ivo Yankov <[email protected]>

* test: add explicit unit texts for balance calculation

Signed-off-by: Ivo Yankov <[email protected]>

* fix: tweak unit tests

Signed-off-by: Ivo Yankov <[email protected]>

* fix: failing acceptance test

Signed-off-by: Ivo Yankov <[email protected]>

* fix: failing acceptance test

Signed-off-by: Ivo Yankov <[email protected]>

* fix: failing tests

Signed-off-by: Ivo Yankov <[email protected]>

Signed-off-by: Ivo Yankov <[email protected]>

Signed-off-by: georgi-l95 <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Co-authored-by: georgi-l95 <[email protected]>
Co-authored-by: Ivo Yankov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Empty to parameter in eth_call causes relay to interrupt deployment.
4 participants