Skip to content

feat: u256 support #111

@tdelabro

Description

@tdelabro

Feature Request

Describe the Feature Request

Support for u256

Describe Preferred Solution

I would like for this lib to expose a U256 type, made of two felts, low and high.

pub struct U256 {
  low: Felt,
  high: Felt,
}
  • lot of quality of like conversion methods: From, FromStr, From<(u128, u128)>, TryInto, TryInto<[Felt, 2]> and so on

Alternative Solution

Some more efficient internal representation, but keeping the ability transform from/to two felts when the need arise

Related Code

I have to use https://docs.rs/starknet/0.13.0/starknet/core/types/struct.U256.html instead. Which doesn't do a great job. So I instead have to handle tupples or custom structs to do this

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions