2023-12-06 14:53:48 +00:00
|
|
|
use serai_primitives::{Balance, SeraiAddress};
|
|
|
|
|
|
|
|
pub use serai_coins_primitives as primitives;
|
|
|
|
use primitives::OutInstructionWithBalance;
|
|
|
|
|
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 {
|
|
|
|
transfer { to: SeraiAddress, balance: Balance },
|
|
|
|
burn { balance: Balance },
|
|
|
|
burn_with_instruction { instruction: OutInstructionWithBalance },
|
|
|
|
}
|
|
|
|
|
2024-06-02 23:58:29 +00:00
|
|
|
#[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))]
|
2023-12-06 14:53:48 +00:00
|
|
|
pub enum Event {
|
|
|
|
Mint { to: SeraiAddress, balance: Balance },
|
|
|
|
Burn { from: SeraiAddress, balance: Balance },
|
|
|
|
BurnWithInstruction { from: SeraiAddress, instruction: OutInstructionWithBalance },
|
|
|
|
Transfer { from: SeraiAddress, to: SeraiAddress, balance: Balance },
|
|
|
|
}
|