serai/substrate/abi/src/coins.rs

24 lines
1 KiB
Rust
Raw Normal View History

use serai_primitives::{Balance, SeraiAddress};
pub use serai_coins_primitives as primitives;
use primitives::OutInstructionWithBalance;
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode)]
#[cfg_attr(feature = "borsh", derive(borsh::BorshSerialize, borsh::BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Call {
transfer { to: SeraiAddress, balance: Balance },
burn { balance: Balance },
burn_with_instruction { instruction: OutInstructionWithBalance },
}
#[derive(Clone, PartialEq, Eq, Debug, scale::Encode, scale::Decode)]
#[cfg_attr(feature = "borsh", derive(borsh::BorshSerialize, borsh::BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
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 },
}