Skip to content

Commit

Permalink
sync with 0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Arrowana committed Aug 6, 2024
1 parent 4bc3019 commit 7e65324
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jupiter-amm-interface"
version = "0.3.3"
version = "0.4.4"
license = "Apache-2.0"
edition = "2021"
description = "AMM interface to integrate a DEX into jupiter-core"
Expand Down
37 changes: 36 additions & 1 deletion src/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub enum Side {
Ask,
}

#[derive(BorshSerialize, Copy, Clone, Debug, PartialEq)]
#[derive(BorshSerialize, Clone, Debug, PartialEq)]
pub enum Swap {
Saber,
SaberAddDecimalsDeposit,
Expand Down Expand Up @@ -100,4 +100,39 @@ pub enum Swap {
lst_value_calc_accs: u8,
lst_index: u32,
},
RaydiumCP,
WhirlpoolSwapV2 {
a_to_b: bool,
remaining_accounts_info: Option<RemainingAccountsInfo>,
},
OneIntro,
PumpdotfunWrappedBuy,
PumpdotfunWrappedSell,
PerpsV2Swap,
PerpsV2AddLiquidity,
PerpsV2RemoveLiquidity,
}

#[derive(BorshSerialize, Copy, Clone, PartialEq, Eq, Debug)]
pub enum AccountsType {
TransferHookA,
TransferHookB,
// TransferHookReward,
// TransferHookInput,
// TransferHookIntermediate,
// TransferHookOutput,
//TickArray,
//TickArrayOne,
//TickArrayTwo,
}

#[derive(BorshSerialize, Clone, Debug, PartialEq)]
pub struct RemainingAccountsSlice {
pub accounts_type: AccountsType,
pub length: u8,
}

#[derive(BorshSerialize, Clone, Debug, PartialEq)]
pub struct RemainingAccountsInfo {
pub slices: Vec<RemainingAccountsSlice>,
}

0 comments on commit 7e65324

Please sign in to comment.