Skip to content

refactor(rpc): starknet_call data parameters to allow hex decimal numbes only#3488

Draft
MaksymMalicki wants to merge 2 commits intomainfrom
maksym/starknet_call_hex
Draft

refactor(rpc): starknet_call data parameters to allow hex decimal numbes only#3488
MaksymMalicki wants to merge 2 commits intomainfrom
maksym/starknet_call_hex

Conversation

@MaksymMalicki
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.45%. Comparing base (f6147ef) to head (e7a3f96).

Files with missing lines Patch % Lines
rpc/rpccore/limit_slice.go 66.66% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3488      +/-   ##
==========================================
+ Coverage   75.37%   75.45%   +0.07%     
==========================================
  Files         382      382              
  Lines       34838    34863      +25     
==========================================
+ Hits        26260    26306      +46     
+ Misses       6729     6710      -19     
+ Partials     1849     1847       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +62 to +67
// LimitSliceHex is like LimitSlice[T, L] but only accepts 0x-prefixed
// hexadecimal strings during JSON unmarshaling, rejecting decimal and bare-hex
type LimitSliceHex[T any, L Limit] struct {
Data []T `validate:"dive"`
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Why create this type, I think it shouldn't exists. I see now that felt.Felt allows Unmarshalling both numbers and strings.

If that's the case, we should then consider fixing it at the root, that is, the felt type only allow hexadecimals, or not proceed at all with this feature.

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a new type is unnecessary complexity to address an implementation detail of felt.Felt

@rodrodros rodrodros changed the title refactor: starknet_call data parameters to allow hex decimal numbes only refactor(rpc): starknet_call data parameters to allow hex decimal numbes only Mar 18, 2026
@MaksymMalicki MaksymMalicki marked this pull request as draft March 18, 2026 16:39
@MaksymMalicki MaksymMalicki marked this pull request as draft March 18, 2026 16:39
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.

2 participants