add genesis liquidity implementation

This commit is contained in:
akildemir
2024-03-27 14:46:15 +03:00
parent 63521f6a96
commit c1bcb0f6c7
12 changed files with 453 additions and 1 deletions

View File

@@ -71,6 +71,15 @@ pub enum DexCall {
Swap(Balance, OutAddress),
}
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
#[cfg_attr(feature = "std", derive(Zeroize))]
#[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum GenesisLiquidityOperation {
Add(SeraiAddress, Balance),
Remove(SeraiAddress, Balance, ExternalAddress),
}
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
#[cfg_attr(feature = "std", derive(Zeroize))]
#[cfg_attr(feature = "borsh", derive(BorshSerialize, BorshDeserialize))]
@@ -78,6 +87,7 @@ pub enum DexCall {
pub enum InInstruction {
Transfer(SeraiAddress),
Dex(DexCall),
GenesisLiquidity(GenesisLiquidityOperation),
}
#[derive(Clone, PartialEq, Eq, Encode, Decode, MaxEncodedLen, TypeInfo, RuntimeDebug)]