mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Add a NewSet event to validator-sets
Updates to the latest serai-dex/substrate due to depending on 10ccaca0eb498a2316bbf627d419b29b1a75933a.
This commit is contained in:
@@ -11,6 +11,15 @@ const PALLET: &str = "ValidatorSets";
|
||||
pub type ValidatorSetsEvent = validator_sets::Event<Runtime>;
|
||||
|
||||
impl Serai {
|
||||
pub async fn get_new_set_events(
|
||||
&self,
|
||||
block: [u8; 32],
|
||||
) -> Result<Vec<ValidatorSetsEvent>, SeraiError> {
|
||||
self
|
||||
.events::<ValidatorSets, _>(block, |event| matches!(event, ValidatorSetsEvent::NewSet { .. }))
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_vote_events(
|
||||
&self,
|
||||
block: [u8; 32],
|
||||
|
||||
Reference in New Issue
Block a user