Skip to content

Commit

Permalink
Add new deposit authority to fuzz tests. Cannot run fuzztests yet due…
Browse files Browse the repository at this point in the history
… to honggfuzz not supporting OSX 11.6 (rust-fuzz/honggfuzz-rs#56). Will circle back with maybe running them via docker.
  • Loading branch information
VegetarianOrc committed Nov 7, 2021
1 parent 020a1dd commit 2e8bde7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions token-swap/program/fuzz/src/native_token_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
)
Expand All @@ -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(),
],
)
Expand Down

0 comments on commit 2e8bde7

Please sign in to comment.