Implement `TryFrom<PartialAccount>` for standard components
- Langage dominant
- Rust
- Étoiles
- 132
- Forks
- 167
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 110
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.