2023-12-06 14:53:48 +00:00
|
|
|
use serai_primitives::*;
|
|
|
|
|
|
|
|
pub use serai_in_instructions_primitives as primitives;
|
|
|
|
use primitives::SignedBatch;
|
|
|
|
|
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))]
|
2024-06-02 23:58:29 +00:00
|
|
|
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
|
|
|
#[cfg_attr(all(feature = "std", feature = "serde"), derive(serde::Deserialize))]
|
2023-12-06 14:53:48 +00:00
|
|
|
pub enum Call {
|
|
|
|
execute_batch { batch: SignedBatch },
|
|
|
|
}
|
|
|
|
|
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))]
|
2024-06-02 23:58:29 +00:00
|
|
|
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
|
|
|
#[cfg_attr(all(feature = "std", feature = "serde"), derive(serde::Deserialize))]
|
2023-12-06 14:53:48 +00:00
|
|
|
pub enum Event {
|
|
|
|
Batch { network: NetworkId, id: u32, block: BlockHash, instructions_hash: [u8; 32] },
|
|
|
|
InstructionFailure { network: NetworkId, id: u32, index: u32 },
|
|
|
|
Halt { network: NetworkId },
|
|
|
|
}
|