mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Declare Error type in decl_module! (#390)
* Declare Error type in decl_module! for parachain-systems * Declare Error type in decl_module! for xcm-handler
This commit is contained in:
@@ -140,6 +140,8 @@ decl_storage! {
|
|||||||
// The pallet's dispatchable functions.
|
// The pallet's dispatchable functions.
|
||||||
decl_module! {
|
decl_module! {
|
||||||
pub struct Module<T: Config> for enum Call where origin: T::Origin {
|
pub struct Module<T: Config> for enum Call where origin: T::Origin {
|
||||||
|
type Error = Error<T>;
|
||||||
|
|
||||||
// Initializing events
|
// Initializing events
|
||||||
// this is needed only if you are using events in your pallet
|
// this is needed only if you are using events in your pallet
|
||||||
fn deposit_event() = default;
|
fn deposit_event() = default;
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ decl_error! {
|
|||||||
|
|
||||||
decl_module! {
|
decl_module! {
|
||||||
pub struct Module<T: Config> for enum Call where origin: T::Origin {
|
pub struct Module<T: Config> for enum Call where origin: T::Origin {
|
||||||
|
type Error = Error<T>;
|
||||||
|
|
||||||
fn deposit_event() = default;
|
fn deposit_event() = default;
|
||||||
|
|
||||||
#[weight = 1_000]
|
#[weight = 1_000]
|
||||||
|
|||||||
Reference in New Issue
Block a user