-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Standard components implement TryFrom<Account> 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.