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
V15 metadata introduces a new custom type map, something like BTreeMap<String, { type_id: u32, value: Vec<u8> }>.
Once this is stable, let's expose them; maybe with an API something like:
let custom_types = api.custom_types();// Get some custom type "Foo", `None` if not found.let ty = custom_types.get("Foo")?;// Attempt to decode into a concrete type (Foo impls DecodeAsType):// can use this to decode into `Value` too. `as_` because we have `as_event`,// `as_extrinsic` or whatever. `decode_as_type` might be nicer.let something:Foo = ty.as_type()?;// Return the raw bytes:let scale_bytes = ty.encoded();// Return the raw type ID:let ty_id = ty.type_id();
The text was updated successfully, but these errors were encountered:
V15 metadata introduces a new custom type map, something like
BTreeMap<String, { type_id: u32, value: Vec<u8> }>
.Once this is stable, let's expose them; maybe with an API something like:
The text was updated successfully, but these errors were encountered: