mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Add method to fetch a block's events to the RPC
This commit is contained in:
@@ -28,18 +28,6 @@ impl crate::Config<CoinsInstance> for Test {
|
||||
type AllowMint = crate::AlwaysAllowMint;
|
||||
}
|
||||
|
||||
impl TryFrom<RuntimeEvent> for serai_abi::Event {
|
||||
type Error = ();
|
||||
fn try_from(event: RuntimeEvent) -> Result<serai_abi::Event, ()> {
|
||||
match event {
|
||||
RuntimeEvent::Core(serai_core_pallet::Event::Event(event)) => {
|
||||
Ok(serai_abi::Event::deserialize_reader(&mut event.as_slice()).unwrap())
|
||||
}
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn new_test_ext() -> sp_io::TestExternalities {
|
||||
let mut storage = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user