Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v15: Remove the module_error_ty #63

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions frame-metadata/src/v15.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,22 +603,6 @@ pub struct OuterEnums<T: Form = MetaForm> {
pub call_enum_ty: T::Type,
/// The type of the outer `RuntimeEvent` enum.
pub event_enum_ty: T::Type,
/// The module error type of the
/// [`DispatchError::Module`](https://docs.rs/sp-runtime/24.0.0/sp_runtime/enum.DispatchError.html#variant.Module) variant.
///
/// The `Module` variant will be 5 scale encoded bytes which are normally decoded into
/// an `{ index: u8, error: [u8; 4] }` struct. This type ID points to an enum type which instead
/// interprets the first `index` byte as a pallet variant, and the remaining `error` bytes as the
/// appropriate `pallet::Error` type. It is an equally valid way to decode the error bytes, and
/// can be more informative.
///
/// # Note
///
/// - This type cannot be used directly to decode `sp_runtime::DispatchError` from the
/// chain. It provides just the information needed to decode `sp_runtime::DispatchError::Module`.
/// - Decoding the 5 error bytes into this type will not always lead to all of the bytes being consumed;
/// many error types do not require all of the bytes to represent them fully.
pub module_error_enum_ty: T::Type,
}

impl IntoPortable for OuterEnums {
Expand All @@ -628,7 +612,6 @@ impl IntoPortable for OuterEnums {
OuterEnums {
call_enum_ty: registry.register_type(&self.call_enum_ty),
event_enum_ty: registry.register_type(&self.event_enum_ty),
module_error_enum_ty: registry.register_type(&self.module_error_enum_ty),
}
}
}