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 harvest test for Rust sdk #648

Merged
merged 50 commits into from
Jan 16, 2025
Merged

Conversation

pauldragonfly
Copy link
Contributor

@pauldragonfly pauldragonfly commented Jan 13, 2025

Add Harvest Position Tests for Multi-Pool + Rewards

Scope: Added tests in harvest.rs to validate fee and reward collection for multi-pool setups.

Key Features:
Multi-Pool Coverage: Tested various pool types (e.g., A-B, A-TE) with different position ranges (centered, one-sided) for both SPL & Token-2022 mints.
Fee Generation: Incorporated swaps to accumulate fees, then verified fee_owed_a, fee_owed_b, and rewards during harvest.
Reward Collection: Validated time/emission-based reward accumulation and balances after harvesting.
Implementation:

pauldragonfly and others added 30 commits December 18, 2024 03:07

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…dk-add-position-test
fmt
Remove unused config function
…dk-add-position-test
…whirlpools into paul/add-increase-liquidity-test-rust-sdk
…m:orca-so/whirlpools into paul/add-decrese-liquidity-test-rust-sdk
…whirlpools into paul/add-increase-liquidity-test-rust-sdk
…whirlpools into paul/rust-sdk-add-position-test
FMT
@pauldragonfly pauldragonfly changed the base branch from main to paul/add-decrese-liquidity-test-rust-sdk January 13, 2025 19:48
@pauldragonfly pauldragonfly marked this pull request as ready for review January 13, 2025 19:49
@pauldragonfly pauldragonfly changed the base branch from paul/add-decrese-liquidity-test-rust-sdk to main January 14, 2025 13:32
@pauldragonfly pauldragonfly changed the base branch from main to paul/add-decrese-liquidity-test-rust-sdk January 14, 2025 13:32
@pauldragonfly pauldragonfly requested review from odcheung, wjthieme and yugure-orca and removed request for odcheung, wjthieme and yugure-orca January 14, 2025 13:37
Copy link
Member

@wjthieme wjthieme left a comment

Choose a reason for hiding this comment

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

Can we do the same thing with rstest? Otherwise looks good to me!

Base automatically changed from paul/add-decrese-liquidity-test-rust-sdk to paul/add-increase-liquidity-test-rust-sdk January 16, 2025 15:02
Base automatically changed from paul/add-increase-liquidity-test-rust-sdk to main January 16, 2025 15:13
Copy link
Member

@wjthieme wjthieme left a comment

Choose a reason for hiding this comment

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

One small nit (that also applies to the other rstests) but LGTM!

.await
.unwrap();

println!(
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need these printlns? They different configs now show up as separate tests right?

@pauldragonfly pauldragonfly merged commit f0ea324 into main Jan 16, 2025
5 checks passed
@pauldragonfly pauldragonfly deleted the paul/add-harvest-test-rust-sdk branch January 16, 2025 20:44
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.

None yet

2 participants