Skip to content

fix: check correct hex encoding for BlockIdentifier & BlockIdentifierOrHash#374

Merged
fmoletta merged 8 commits into
mainfrom
check_block_identifier
Sep 12, 2024
Merged

fix: check correct hex encoding for BlockIdentifier & BlockIdentifierOrHash#374
fmoletta merged 8 commits into
mainfrom
check_block_identifier

Conversation

@fmoletta

@fmoletta fmoletta commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

Motivation
Checking that the hex values for the block field of rpc requests have a "0x" prefix and returning the correct rpc error if they don't

Description

  • Replace Deserialize iml of BlockIdentifier & BlockIdentifierOrHash with a parse method that returns the correct RpcError upon failure and checks for correct prefixes
  • Move BlockIdentifier & BlockIdentifierOrHash to a separate module under rpc/types

Closes #371

@fmoletta fmoletta marked this pull request as ready for review September 12, 2024 14:33
@fmoletta fmoletta requested a review from a team as a code owner September 12, 2024 14:33
@fmoletta fmoletta added this pull request to the merge queue Sep 12, 2024
Merged via the queue into main with commit 108635f Sep 12, 2024
@fmoletta fmoletta deleted the check_block_identifier branch September 12, 2024 19:26
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.

Add hex string prefix check to all json parsing

2 participants