Skip to content

feat: add rpc endpoint eth_getCode#162

Merged
fmoletta merged 44 commits into
mainfrom
eth_getCode
Jul 18, 2024
Merged

feat: add rpc endpoint eth_getCode#162
fmoletta merged 44 commits into
mainfrom
eth_getCode

Conversation

@fmoletta

@fmoletta fmoletta commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

Based on #160

Motivation

Support rpc endpoint eth_getCode

Description

  • Add rpc endpoint eth_getCode
  • Add methods to obtain account code to Store api

Closes #38

@fmoletta fmoletta changed the base branch from main to eth_get_Balance July 17, 2024 20:50
@fmoletta fmoletta marked this pull request as ready for review July 17, 2024 21:01
@fmoletta fmoletta requested a review from a team as a code owner July 17, 2024 21:01
Ok(self.block_numbers.get(&block_hash).copied())
}

fn add_account_code(&mut self, code_hash: H256, code: Bytes) -> Result<(), StoreError> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: why don't we have to specify pub here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is part of a trait implementation, so it has the same visibility as the trait (which is public in this case)

Base automatically changed from eth_get_Balance to main July 18, 2024 15:52
@fmoletta fmoletta merged commit 591fbec into main Jul 18, 2024
@fmoletta fmoletta deleted the eth_getCode branch July 18, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement eth_getCode RPC endpoint

2 participants