Skip to content

Implement From to convert abi type into Vec<FieldElement> #21

@glihm

Description

@glihm

Currently, this is the way to serialize data into felts:

let m = MyData {
    name: felt!("0x1234").into(),
    class_hash: felt!("0x5555").into(),
};

let felts = MyData::cairo_serialize(&m);                                                                                                                                         

To improve the Rustiness of this, we may want to do:

let m = MyData {
    name: felt!("0x1234").into(),
    class_hash: felt!("0x5555").into(),
};

let felts = m.into();                                                                                                                                         

This issue aims at tracking the implementation (which should be possible) of such pattern.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions