Skip to content

Commit 10b6101

Browse files
authored
feat: add dflow in whitelisted programs (#1924)
1 parent 4d1cfe9 commit 10b6101

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

programs/drift/src/ids.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,8 @@ pub mod amm_spread_adjust_wallet {
107107
#[cfg(feature = "anchor-test")]
108108
declare_id!("1ucYHAGrBbi1PaecC4Ptq5ocZLWGLBmbGWysoDGNB1N");
109109
}
110+
111+
pub mod dflow_mainnet_aggregator_4 {
112+
use solana_program::declare_id;
113+
declare_id!("DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH");
114+
}

programs/drift/src/instructions/keeper.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use crate::controller::spot_balance::update_spot_balances;
2121
use crate::controller::token::{receive, send_from_program_vault};
2222
use crate::error::ErrorCode;
2323
use crate::ids::admin_hot_wallet;
24+
use crate::ids::dflow_mainnet_aggregator_4;
2425
use crate::ids::{jupiter_mainnet_3, jupiter_mainnet_4, jupiter_mainnet_6, serum_program};
2526
use crate::instructions::constraints::*;
2627
use crate::instructions::optional_accounts::get_revenue_share_escrow_account;
@@ -1721,6 +1722,7 @@ pub fn handle_liquidate_spot_with_swap_begin<'c: 'info, 'info>(
17211722
jupiter_mainnet_3::ID,
17221723
jupiter_mainnet_4::ID,
17231724
jupiter_mainnet_6::ID,
1725+
dflow_mainnet_aggregator_4::ID,
17241726
];
17251727
validate!(
17261728
whitelisted_programs.contains(&ix.program_id),

programs/drift/src/instructions/user.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use crate::controller::spot_position::{
2222
};
2323
use crate::error::ErrorCode;
2424
use crate::ids::admin_hot_wallet;
25+
use crate::ids::dflow_mainnet_aggregator_4;
2526
use crate::ids::{
2627
jupiter_mainnet_3, jupiter_mainnet_4, jupiter_mainnet_6, lighthouse, marinade_mainnet,
2728
serum_program,
@@ -3678,6 +3679,7 @@ pub fn handle_begin_swap<'c: 'info, 'info>(
36783679
jupiter_mainnet_3::ID,
36793680
jupiter_mainnet_4::ID,
36803681
jupiter_mainnet_6::ID,
3682+
dflow_mainnet_aggregator_4::ID,
36813683
];
36823684
if !delegate_is_signer {
36833685
whitelisted_programs.push(Token::id());

0 commit comments

Comments
 (0)