mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
It's not only helpful (to easily check where Serai's view of the external network is) but it's necessary in case of a non-trivial chain fork to determine which blockchain Serai considers canonical.
31 lines
1.0 KiB
Rust
31 lines
1.0 KiB
Rust
use serai_primitives::*;
|
|
|
|
pub use serai_in_instructions_primitives as primitives;
|
|
use primitives::SignedBatch;
|
|
use serai_validator_sets_primitives::Session;
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
|
#[cfg_attr(feature = "borsh", derive(borsh::BorshSerialize, borsh::BorshDeserialize))]
|
|
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
|
#[cfg_attr(all(feature = "std", feature = "serde"), derive(serde::Deserialize))]
|
|
pub enum Call {
|
|
execute_batch { batch: SignedBatch },
|
|
}
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode, scale_info::TypeInfo)]
|
|
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
|
|
#[cfg_attr(all(feature = "std", feature = "serde"), derive(serde::Deserialize))]
|
|
pub enum Event {
|
|
Batch {
|
|
network: NetworkId,
|
|
publishing_session: Session,
|
|
id: u32,
|
|
external_network_block_hash: [u8; 32],
|
|
in_instructions_hash: [u8; 32],
|
|
in_instruction_results: bitvec::vec::BitVec<u8, bitvec::order::Lsb0>,
|
|
},
|
|
Halt {
|
|
network: NetworkId,
|
|
},
|
|
}
|