You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is difficult to accomplish without re-building the RuntimeMetadataPrefixed struct for each metadata version and implementing the trait on that. RuntimeMetadataPrefixed has many nested datastructures within it that are often wrapped in DecodeDifferent which makes simple traversing & querying difficult. Not sure of a good way around this, so sticking with From/Into conversions into the Desub Metadata structure is fine for now.
The chief reason for implementing Metadata as a trait is making the API nicer and also making it easier to port over different metadata versions.
One solution could be implementing a trait on DecodeDifferent itself that will always decode to one of the DecodeDifferent enum variants.
instead of a struct that older metadata versions are converted into, use a trait which older metadata versions implement
This will cause less future compilation issues, and create an easier api to use
Instead of converting each metadata version into one superstruct, we could define a trait with common functions such as
module_by_index
and impl traitThe text was updated successfully, but these errors were encountered: