refactor(starknet): replace BlockStatus string with typed enum by 0xsamalt · Pull Request #3779 · NethermindEth/juno · GitHub
Skip to content

refactor(starknet): replace BlockStatus string with typed enum#3779

Open
0xsamalt wants to merge 1 commit into
NethermindEth:mainfrom
0xsamalt:refactor/block-status-type
Open

refactor(starknet): replace BlockStatus string with typed enum#3779
0xsamalt wants to merge 1 commit into
NethermindEth:mainfrom
0xsamalt:refactor/block-status-type

Conversation

@0xsamalt

@0xsamalt 0xsamalt commented Jul 1, 2026

Copy link
Copy Markdown
  • Introduces BlockStatus as a typed uint8 enum in starknet/block.go with constants BlockPending, BlockAcceptedOnL1, BlockAcceptedOnL2, BlockRejected, and BlockPreConfirmed
  • Adds UnmarshalText so the feeder JSON response deserialises directly into the enum and invalid status strings now return an error
  • Updates all comparison sites and test assertions to use the typed constants

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.

1 participant