2023-12-06 14:53:48 +00:00
|
|
|
pub use serai_validator_sets_primitives as primitives;
|
|
|
|
|
|
|
|
use serai_primitives::*;
|
|
|
|
use serai_validator_sets_primitives::*;
|
|
|
|
|
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 = "serde", derive(serde::Serialize, serde::Deserialize))]
|
|
|
|
pub enum Call {
|
|
|
|
set_keys {
|
|
|
|
network: NetworkId,
|
2023-12-15 04:45:15 +00:00
|
|
|
removed_participants: Vec<SeraiAddress>,
|
2023-12-06 14:53:48 +00:00
|
|
|
key_pair: KeyPair,
|
|
|
|
signature: Signature,
|
|
|
|
},
|
|
|
|
allocate {
|
|
|
|
network: NetworkId,
|
|
|
|
amount: Amount,
|
|
|
|
},
|
|
|
|
deallocate {
|
|
|
|
network: NetworkId,
|
|
|
|
amount: Amount,
|
|
|
|
},
|
|
|
|
claim_deallocation {
|
|
|
|
network: NetworkId,
|
|
|
|
session: Session,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
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 {
|
|
|
|
NewSet {
|
|
|
|
set: ValidatorSet,
|
|
|
|
},
|
|
|
|
ParticipantRemoved {
|
|
|
|
set: ValidatorSet,
|
|
|
|
removed: SeraiAddress,
|
|
|
|
},
|
|
|
|
KeyGen {
|
|
|
|
set: ValidatorSet,
|
|
|
|
key_pair: KeyPair,
|
|
|
|
},
|
|
|
|
AllocationIncreased {
|
|
|
|
validator: SeraiAddress,
|
|
|
|
network: NetworkId,
|
|
|
|
amount: Amount,
|
|
|
|
},
|
|
|
|
AllocationDecreased {
|
|
|
|
validator: SeraiAddress,
|
|
|
|
network: NetworkId,
|
|
|
|
amount: Amount,
|
|
|
|
delayed_until: Option<Session>,
|
|
|
|
},
|
|
|
|
DeallocationClaimed {
|
|
|
|
validator: SeraiAddress,
|
|
|
|
network: NetworkId,
|
|
|
|
session: Session,
|
|
|
|
},
|
|
|
|
SetRetired {
|
|
|
|
set: ValidatorSet,
|
|
|
|
},
|
|
|
|
}
|