Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataAvailabilityMode should implement Into<u32> #203

Open
tdelabro opened this issue Mar 22, 2024 · 0 comments
Open

DataAvailabilityMode should implement Into<u32> #203

tdelabro opened this issue Mar 22, 2024 · 0 comments

Comments

@tdelabro
Copy link
Contributor

https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/transactions/#v3_hash_calculation

The doc states that while computing the hash of a tx v3 the DataAvailabilityMode should be represented as a u32 and concatenated inside a Felt.

It would be handy to have this method coming with the lib.
Right now I have to do

nonce_data_availability_mode as u32

This implies a silent overflow if the DataAvailabilityMode internal happens to be greater than a u32.
I know it is not the case, but, as a lib user, I shouldn't have to ask the question and go check the code myself.

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

No branches or pull requests

1 participant