juno icon indicating copy to clipboard operation
juno copied to clipboard

refactor(starknet): replace BlockStatus string with typed enum

Open 0xsamalt opened this issue 5 months ago • 0 comments

  • 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

0xsamalt avatar Jul 01 '26 16:07 0xsamalt