2023-12-06 14:53:48 +00:00
|
|
|
use sp_consensus_grandpa::EquivocationProof;
|
|
|
|
|
|
|
|
use serai_primitives::{BlockNumber, SeraiAddress};
|
|
|
|
|
2023-12-07 07:30:09 +00:00
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
2023-12-06 14:53:48 +00:00
|
|
|
pub struct ReportEquivocation {
|
|
|
|
pub equivocation_proof: Box<EquivocationProof<[u8; 32], BlockNumber>>,
|
2023-12-16 22:44:08 +00:00
|
|
|
pub key_owner_proof: SeraiAddress,
|
2023-12-06 14:53:48 +00:00
|
|
|
}
|
|
|
|
|
2023-12-07 07:30:09 +00:00
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
2023-12-06 14:53:48 +00:00
|
|
|
pub enum Call {
|
|
|
|
report_equivocation(ReportEquivocation),
|
|
|
|
report_equivocation_unsigned(ReportEquivocation),
|
|
|
|
}
|
|
|
|
|
2023-12-07 07:30:09 +00:00
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
2023-12-06 14:53:48 +00:00
|
|
|
#[cfg_attr(feature = "borsh", derive(borsh::BorshSerialize, borsh::BorshDeserialize))]
|
|
|
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
|
|
|
pub enum Event {
|
|
|
|
NewAuthorities { authority_set: Vec<(SeraiAddress, u64)> },
|
2023-12-07 07:30:09 +00:00
|
|
|
// TODO: Remove these
|
2023-12-06 14:53:48 +00:00
|
|
|
Paused,
|
|
|
|
Resumed,
|
|
|
|
}
|