From 2e8bde7ed6c7925fb2a7bda2d05e9ca1de66e69f Mon Sep 17 00:00:00 2001 From: Alex Mazzeo Date: Sun, 7 Nov 2021 13:14:27 -0800 Subject: [PATCH] Add new deposit authority to fuzz tests. Cannot run fuzztests yet due to honggfuzz not supporting OSX 11.6 (https://github.com/rust-fuzz/honggfuzz-rs/issues/56). Will circle back with maybe running them via docker. --- token-swap/program/fuzz/src/native_token_swap.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/token-swap/program/fuzz/src/native_token_swap.rs b/token-swap/program/fuzz/src/native_token_swap.rs index b340eb5b433..a636b1948a4 100644 --- a/token-swap/program/fuzz/src/native_token_swap.rs +++ b/token-swap/program/fuzz/src/native_token_swap.rs @@ -75,6 +75,8 @@ impl NativeTokenSwap { &authority_account.key, token_b_amount, ); + let mut deposit_authority = NativeAccountData::new(0, system_program::id()); + deposit_authority.is_signer = true; let init_instruction = instruction::initialize( &spl_token_swap::id(), @@ -86,6 +88,7 @@ impl NativeTokenSwap { &pool_mint_account.key, &pool_fee_account.key, &pool_token_account.key, + &deposit_authority.key, fees.clone(), swap_curve.clone(), ) @@ -101,6 +104,7 @@ impl NativeTokenSwap { pool_mint_account.as_account_info(), pool_fee_account.as_account_info(), pool_token_account.as_account_info(), + deposit_authority.as_account_info(), token_program_account.as_account_info(), ], )