Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add increase liquidity test for rust sdk #605

Open
wants to merge 3 commits into
base: paul/rust-sdk-add-position-test
Choose a base branch
from

Conversation

pauldragonfly
Copy link
Contributor

@pauldragonfly pauldragonfly commented Dec 19, 2024

Add tests for increase liquidity and update RPC configurations

Changes

  1. Added tests for increase liquidity functionality
  2. Added configuration to RPC setup
  3. Updated existing position and pool tests to use configuration-based setup
  4. Updated program to ensure proper functioning of setup position and setup te position operations

Details

  • Implemented test cases covering various scenarios for increase liquidity
  • Refactored existing tests to align with new configuration pattern
  • Fixed program logic for position setup operations

@pauldragonfly pauldragonfly marked this pull request as ready for review December 19, 2024 04:00

ctx.send_transaction_with_signers(increase_ix.instructions, signers)
.await?;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I would assert that the quote matches whatever happened on-chain (same way we have the test in ts sdk)

position_bump,
});

println!("Sending transaction with instructions...");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This print can be removed?

@@ -237,3 +343,13 @@ pub async fn setup_position_bundle(

Ok(position_bundle_address)
}

pub async fn setup_config_and_fee_tiers(ctx: &RpcContext) -> Result<(), Box<dyn Error>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere? it is not actually setting up any fee tiers and/or configs

@@ -40,6 +40,7 @@ use crate::{SPLASH_POOL_TICK_SPACING, WHIRLPOOLS_CONFIG_ADDRESS};
pub struct RpcContext {
pub rpc: RpcClient,
pub signer: Keypair,
pub config: Pubkey,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this param used anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants