Skip to content

DataAvailabilityMode should implement Into<u32> #203

@tdelabro

Description

@tdelabro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions