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

Query mirror node for deployed_bytecode in eth_getCode #418

Merged
merged 3 commits into from
Aug 6, 2022

Conversation

Ivo-Yankov
Copy link
Collaborator

@Ivo-Yankov Ivo-Yankov commented Aug 4, 2022

Description:
eth_getCode makes a request to the mirror node. In the case of an empty result (0x) or if the contract has not yet been propagated to the mirror node the bytecode is retrieved from consensus.

Related issue(s):

Fixes #27

Notes for reviewer:

Checklist

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

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
@Ivo-Yankov Ivo-Yankov linked an issue Aug 4, 2022 that may be closed by this pull request
@Ivo-Yankov Ivo-Yankov changed the title feat: query mirror node for contract bytecode Query mirror node for bytecode in eth_getCode Aug 4, 2022
@Ivo-Yankov Ivo-Yankov changed the title Query mirror node for bytecode in eth_getCode Query mirror node for deployed_bytecode in eth_getCode Aug 4, 2022
@Ivo-Yankov Ivo-Yankov marked this pull request as ready for review August 4, 2022 15:13
@Ivo-Yankov Ivo-Yankov added enhancement New feature or request limechain P1 labels Aug 4, 2022
@Ivo-Yankov Ivo-Yankov self-assigned this Aug 4, 2022
@Ivo-Yankov Ivo-Yankov added this to the 0.6.0 milestone Aug 4, 2022
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.

LG, missing one test case based on product logic

packages/relay/tests/lib/eth.spec.ts Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 5, 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

@codecov-commenter
Copy link

Codecov Report

Merging #418 (3272dd9) into main (578fc45) will increase coverage by 0.09%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
+ Coverage   73.55%   73.65%   +0.09%     
==========================================
  Files          10       10              
  Lines         832      835       +3     
  Branches      136      137       +1     
==========================================
+ Hits          612      615       +3     
  Misses        172      172              
  Partials       48       48              
Impacted Files Coverage Δ
packages/relay/src/lib/eth.ts 81.25% <83.33%> (+0.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

LG

@Nana-EC Nana-EC merged commit 06e89ee into main Aug 6, 2022
@Nana-EC Nana-EC deleted the 27-get-code-runtime-bytecode branch August 6, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request limechain P1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update eth_getCode to work with new mirror node implementation
3 participants