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
Hi, I encounter an issue on Kusama when regsitering custom types from different metadatas, specifically, one is spec "9151" and another one is "9300". The type:[sp_runtime:DispatchError] in these two metadata are different
The type of error field is different, it's U8 in 9151 and [U8; 4] in 9300, their length in bytes are different. The sp_runtime:DispatchError in 9330 won't get registered if I register metadata from 9151 first.
It seems better to separate those type registries (currenctly in global) for different spec-versions (even different chain, for example, using this library for DOT and KSM simultaneously). Do I miss anything?
The text was updated successfully, but these errors were encountered:
Lovely, I didn't expect the solution is so simple and intuitive.
I use itering/substrate-api-rpc simultaneously, and generate types.Metadata via substrate-api-rpc/metadata.RegNewMetadataType. Now there is no way to perform this setting.
I propose to make a PR to accept ScaleDecoderOption in MetadataDecoder.Init, then the spec parameter in RegNewMetadata could be assigned to MetadataDecoder.
But make the behavior default might be unexpected to others. I can add a flag or options hidden by vargs, and the default behavior is the original one.
Hi, I encounter an issue on Kusama when regsitering custom types from different metadatas, specifically, one is spec "9151" and another one is "9300". The type:[sp_runtime:DispatchError] in these two metadata are different
The one in 9151
The one in 9300
The type of error field is different, it's
U8
in 9151 and[U8; 4]
in 9300, their length in bytes are different. Thesp_runtime:DispatchError
in 9330 won't get registered if I register metadata from 9151 first.It seems better to separate those type registries (currenctly in global) for different spec-versions (even different chain, for example, using this library for DOT and KSM simultaneously). Do I miss anything?
The text was updated successfully, but these errors were encountered: