Skip to content

Improve the data-transformer::cairo-types::CairoU256 creation logic #2576

@integraledelebesgue

Description

@integraledelebesgue

Component the issue is related to

Data Transformer

Issue

CairoU256::from_bytes accepts an unbound u8 slice, panicking if it's shorter than 32 bytes and ignoring the extra bytes if it's longer.
The argument should be a fixed-sized slice - &[u8; 32].
Usage in cheatnet::runtime_extensions::forge_runtime_extension should be adjusted to the new method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Triage

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions