0xMiden / 0xMiden/protocol

Implement `TryFrom<PartialAccount>` for standard components

Aperta
#2,456 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

Standard components implement `TryFrom` to ease the extraction of components from an account.

As it is right now, some standard components do not require the full account for this and could just implement conversions from storage headers or any related struct (like `PartialAccount`). This applies to any component that does not use storage maps, as `AccountStorageHeader` will have all the necessary storage slots data (ie, all the value slots).

This would allow users to easily extract things like token metadata from the network without having to download the full `Account`, which may have extra roundtrips and data (right now, you can get the header storage with a single `GetAccount` call). Of course, this is doable right now but slots need to be read and parsed manually.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.