-
Notifications
You must be signed in to change notification settings - Fork 169
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
Address review comments on PR134 #147
Merged
yugure-orca
merged 9 commits into
yugure/token-extensions
from
yugure/address-review-comments
May 24, 2024
Merged
Address review comments on PR134 #147
yugure-orca
merged 9 commits into
yugure/token-extensions
from
yugure/address-review-comments
May 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 41008b1.
yugure-orca
changed the title
[WIP] Address review comments
Address review comments on PR134
May 23, 2024
52 tasks
philcchen
approved these changes
May 24, 2024
yugure-orca
added a commit
that referenced
this pull request
May 24, 2024
* upgrade to solana 1.17 & anchor 0.29 * just add v2 instructions as v1 clone * migrate to InterfaceAccount, add memo and mints * add v2 token transfer * swap util v2 * rename const memo to transfer_memo * add is_supported_token_mint check * add safe guard (for TODO) * add safe guard (for TODO) * add V2 ix on WhirlpoolIx class * add v2 test fixture * update test cases (collect_fees_v2, collect_protocol_fees_v2) * update test cases (collect_reward_v2) * update test cases (increase/decrease liquidity) * update test cases (init pool & init reward) * update test cases (set_reward_emmissions_v2) * update test cases (swap_v2) * update test cases (two_hop_swap_v2) * add transfer fee extension * add ConfigExtension and TokenBadge * add transfer hook extension * add TransferHook test program * support ConfidentialTransferMint (but non-confidential transfer only) * format doc (v2 test cases) * add token_program address constraints / add invalid account test cases * add MemoTransfer ext test cases * add TransferHook ext test cases * add Confidential Transfer test cases * add ConfigExtension/TokenBadge ix test cases * restructure ConfigExtension authority relation * add TransferFee ext test cases * add additional TransferFee ext test cases * update is_supported_token_mint logic mint of TokenProgram will be always supported (for compatibility) * add SupportedToken test cases * block FeeTier and tickSpacing unmatch * add fake TokenBadge test cases * add more TransferHook test cases (hook program block transfer) * add more TransferFee test cases (update and max) * add logging TransferFee config state * fix test case errors (feetier / tickspacing unmatch) * remove TA related defs from remaining_accounts * [WIP] Token extension step 2 (mainly SDK side) (#141) * drop supporting native mint of Token-2022 * add remaining accounts comment on Accounts struct * upgrade SDK anchor version to v0.29 * fix type unmatch on RemainingAccountsInfoData * use common-sdk with TokenExtension * intro TransferFee into SDK * intro TransferHook into SDK * impl vault to vault transfer * use vault to vault transfer * eliminate mid owner token account from two_hop_swap * add test cases for TransferFee edge case (100% fee rate) * add test cases for TransferFee edge case (100% fee rate) (twoHopSwap) * address review comment (fix comment) * twoHop: check overlapping in handler, fix testcase * [sdk] fix position-impl * Yugure/token extension step 3 (SDK/client) (#143) * add testcase: re-initialize TokenBadge * make TokenExtensionUtil public * use V2 instructions * deprecate PriceModule, WhirlpoolRouter * add isSupportedToken (client side) * add client test * client impl update * [audit feedback] add RemainingAccountsDuplicatedAccountsType error * [audit feedback] split AmountWithTransferFee * [audit feedback] add fuzz_tests for fee calc * Token extension merge from main (price slippage) (#145) * Price-based slippage calculation for increase liquidity (#135) - Deprecated the old increaseLiquidityQuoteByInputToken quote function & added a new increaseLiquidityQuoteByInputTokenUsingPriceSlippage to calculate tokenMax based on price movement - Adding increaseLiquidityQuoteByLiquidity quote function to generate a quote by a set liquidity value * Bump common-sdk to 0.5.2 (#138) * Bump common-sdk to 0.5.2 * Lockfile * Version bump --------- Co-authored-by: Michael Hwang <[email protected]> Co-authored-by: Wilhelm Thieme <[email protected]> * Bump common-sdk to 0.5.3 (#139) * Bump common-sdk to 0.5.3 * Bump whirlpools-sdk to 0.12.4 * Remove some unnused/unnecessary lock files (#137) * use idempotent on whirlpool.swap (swapAsync) (#142) * use idempotent on whirlpool.swap (swapAsync) * add test case * bump version 0.12.5 * fix compile error --------- Co-authored-by: meep <[email protected]> Co-authored-by: tmoc <[email protected]> Co-authored-by: Michael Hwang <[email protected]> Co-authored-by: Wilhelm Thieme <[email protected]> Co-authored-by: Will <[email protected]> * fix merge issue (dup comment) * use the latest common sdk, fix build error (router doesn't support TE) * bump to 0.13.0-alpha.0 * Address review comments on PR134 (#147) * fix comment * combine two statements depending on same condition * refactor isV2IxRequiredPool * refactor: split TokenAmountWithFee into 2 explicit types * type change BN to TransferFeeIn(Ex)cludedAmount on quotes * Revert "type change BN to TransferFeeIn(Ex)cludedAmount on quotes" This reverts commit 41008b1. * fix Router test case (compatibility) * make remaining_accounts_info Option * add getExtraAccountMetasForTransferHookForPool * bump to 0.3.0 --------- Co-authored-by: meep <[email protected]> Co-authored-by: tmoc <[email protected]> Co-authored-by: Michael Hwang <[email protected]> Co-authored-by: Wilhelm Thieme <[email protected]> Co-authored-by: Will <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to address review comments on #134 .
PR134 contains many difference, so to clarify the difference to address comments, I've created separate PR.
Once this PR have been approved, will merge into
yugure/token-extensions
branch, and then it will be merged intomain
.