Remove ApplicationCall

We can simply inline `Dex` into the InInstruction enum.
This commit is contained in:
Luke Parker
2023-07-26 12:45:51 -04:00
parent 7823ece4fe
commit f8afb040dc
3 changed files with 11 additions and 39 deletions

View File

@@ -21,31 +21,13 @@ use serai_primitives::{BlockHash, Balance, NetworkId, SeraiAddress, ExternalAddr
mod shorthand;
pub use shorthand::*;
#[rustfmt::skip]
#[derive(
Clone, Copy, PartialEq, Eq, Debug, Serialize, Deserialize, Encode, Decode, MaxEncodedLen, TypeInfo,
)]
#[cfg_attr(feature = "std", derive(Zeroize))]
pub enum Application {
DEX,
}
#[derive(
Clone, PartialEq, Eq, Debug, Serialize, Deserialize, Encode, Decode, MaxEncodedLen, TypeInfo,
)]
#[cfg_attr(feature = "std", derive(Zeroize))]
pub struct ApplicationCall {
pub application: Application,
pub data: Data,
}
#[derive(
Clone, PartialEq, Eq, Debug, Serialize, Deserialize, Encode, Decode, MaxEncodedLen, TypeInfo,
)]
#[cfg_attr(feature = "std", derive(Zeroize))]
pub enum InInstruction {
Transfer(SeraiAddress),
Call(ApplicationCall),
Dex(Data),
}
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Encode, Decode, TypeInfo, RuntimeDebug)]