From 32fe1b02dffd6a3a8f64b244e8bedd7f7e40a31d Mon Sep 17 00:00:00 2001 From: 0x777A Date: Tue, 10 Dec 2024 14:09:05 +0800 Subject: [PATCH] update --- README.md | 2 +- programs/cp-swap/src/instructions/initialize.rs | 4 ++-- programs/cp-swap/src/instructions/swap_base_input.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5e0a83f..dc1bd59 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Clone the repository and test the program. ```shell git clone https://github.com/raydium-io/raydium-cp-swap -cd raydium-cp-swap && anchor test +cd raydium-cp-swap && yarn && anchor test ``` ## License diff --git a/programs/cp-swap/src/instructions/initialize.rs b/programs/cp-swap/src/instructions/initialize.rs index 815b64b..4546f79 100644 --- a/programs/cp-swap/src/instructions/initialize.rs +++ b/programs/cp-swap/src/instructions/initialize.rs @@ -101,7 +101,7 @@ pub struct Initialize<'info> { )] pub creator_lp_token: Box>, - /// CHECK: Token_0 vault for the pool + /// CHECK: Token_0 vault for the pool, create by contract #[account( mut, seeds = [ @@ -113,7 +113,7 @@ pub struct Initialize<'info> { )] pub token_0_vault: UncheckedAccount<'info>, - /// CHECK: Token_1 vault for the pool + /// CHECK: Token_1 vault for the pool, create by contract #[account( mut, seeds = [ diff --git a/programs/cp-swap/src/instructions/swap_base_input.rs b/programs/cp-swap/src/instructions/swap_base_input.rs index fd7bfa6..f93a49a 100644 --- a/programs/cp-swap/src/instructions/swap_base_input.rs +++ b/programs/cp-swap/src/instructions/swap_base_input.rs @@ -166,7 +166,7 @@ pub fn swap_base_input(ctx: Context, amount_in: u64, minimum_amount_out: u "source_amount_swapped:{}, destination_amount_swapped:{}, trade_fee:{}, constant_before:{},constant_after:{}", result.source_amount_swapped, result.destination_amount_swapped, - trade_fee, + result.trade_fee, constant_before, constant_after );