feat: (PRO-413) Enhance fee payer outflow calculation to include SPL …#233
Merged
dev-jodee merged 2 commits intorelease/feature-freeze-for-auditfrom Oct 15, 2025
Conversation
…token transfers - Updated `calculate_fee_payer_outflow` to account for SPL token transfers, improving accuracy in fee estimation. - Added comprehensive tests for SPL token transfer scenarios to ensure correct fee calculations. - Adjusted transaction validation to utilize updated outflow calculations, ensuring consistency across transaction processing.
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to d0bbb12 in 2 minutes and 8 seconds. Click for details.
- Reviewed
1497lines of code in9files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. tests/rpc/fee_estimation.rs:157
- Draft comment:
The assert_eq error message says 'Fee in lamports should be 10000', but the expected value is 10050. Update the message to reflect the correct expected fee of 10050 lamports. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. tests/rpc/fee_estimation.rs:330
- Draft comment:
Consider avoiding hard-coded magic numbers for expected fees (e.g. rent exemption values). Computing these using get_minimum_balance_for_rent_exemption would make the test more robust. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_007IVroKc1AZZZZ7
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
amilz
approved these changes
Oct 15, 2025
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed 22d4f92 in 58 seconds. Click for details.
- Reviewed
415lines of code in15files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. tests/rpc/fee_estimation.rs:155
- Draft comment:
The assert message shows 'Fee in lamports should be 10000' but the expected value is 10050. Update the error message to avoid confusion. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. tests/rpc/fee_estimation.rs:430
- Draft comment:
Consider replacing the debug println (line 430) with a logging macro or removing it, to keep test output clean. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
Workflow ID: wflow_cMieET9FdlmxP7p4
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
This file contains hidden or 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
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.
…token transfers
calculate_fee_payer_outflowto account for SPL token transfers, improving accuracy in fee estimation.Important
Enhance fee payer outflow calculation to include SPL token transfers for accurate fee estimation and update related transaction validation and tests.
calculate_fee_payer_outflowinfee.rsto include SPL token transfers for accurate fee estimation.transaction_validator.rsto use updated outflow calculations.fee.rsfor SPL token transfer scenarios to ensure correct fee calculations.jupiter_integration.rsfor unknown tokens.oracle.rsandauth.rs.encode_versioned_transactionintransaction.rsto returnResult.This description was created by
for 22d4f92. You can customize this summary. It will automatically update as commits are pushed.
📊 Unit Test Coverage
Unit Test Coverage: 83.7%
View Detailed Coverage Report