Skip to content

Commit

Permalink
remove
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Dec 30, 2024
1 parent dcc2758 commit 5495c86
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 7 additions & 3 deletions modules/pallets/demo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,13 @@ pub mod pallet {
host.store_state_machine_update_time(height, host.timestamp()).unwrap();

// deposit the event
pallet_ismp::Pallet::<T>::deposit_pallet_event(Event::StateMachineUpdated(
StateMachineUpdated { state_machine_id: height.id, latest_height: height.height },
));
pallet_ismp::Pallet::<T>::deposit_event(
Event::StateMachineUpdated(StateMachineUpdated {
state_machine_id: height.id,
latest_height: height.height,
})
.into(),
);

Ok(())
}
Expand Down
5 changes: 3 additions & 2 deletions modules/pallets/fishermen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ pub mod pallet {
PendingVetoes::<T>::remove(height);

Self::deposit_event(Event::StateCommitmentVetoed { height, commitment });
pallet_ismp::Pallet::<T>::deposit_pallet_event(
pallet_ismp::Pallet::<T>::deposit_event(
ismp::events::Event::StateCommitmentVetoed(StateCommitmentVetoed {
height,
fisherman: account.as_ref().to_vec(),
}),
})
.into(),
);
} else {
PendingVetoes::<T>::insert(height, account.clone());
Expand Down
5 changes: 0 additions & 5 deletions modules/pallets/ismp/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ use ismp::{
use sp_core::{offchain::StorageKind, H256};

impl<T: Config> Pallet<T> {
/// Deposit a pallet [`Event<T>`]
pub fn deposit_pallet_event<E: Into<Event<T>>>(event: E) {
Self::deposit_event(event.into())
}

/// Generate an MMR proof for the given `leaf_indices`.
/// Note this method can only be used from an off-chain context
/// (Offchain Worker or Runtime API call), since it requires
Expand Down
4 changes: 2 additions & 2 deletions modules/pallets/ismp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#![doc = include_str!("../README.md")]
#![cfg_attr(not(feature = "std"), no_std)]
#![deny(missing_docs, unused_imports)]
#![deny(unused_imports)]

extern crate alloc;
extern crate core;
Expand Down Expand Up @@ -405,7 +405,7 @@ pub mod pallet {

/// Pallet Events
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pallet::generate_deposit(pub fn deposit_event)]
pub enum Event<T: Config> {
/// Emitted when a state machine is successfully updated to a new height
StateMachineUpdated {
Expand Down
4 changes: 2 additions & 2 deletions modules/pallets/state-coprocessor/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,13 @@ where
},
);
pallet_ismp::Responded::<T>::insert(req_commitment, true);
pallet_ismp::Pallet::<T>::deposit_pallet_event(event);
pallet_ismp::Pallet::<T>::deposit_event(event.into());
let event = pallet_ismp::Event::GetRequestHandled(RequestResponseHandled {
commitment: req_commitment,
relayer: address.clone(),
});

pallet_ismp::Pallet::<T>::deposit_pallet_event(event);
pallet_ismp::Pallet::<T>::deposit_event(event.into());

Ok(())
}
Expand Down

0 comments on commit 5495c86

Please sign in to comment.