Pay gas from payment hub#3713
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a payment hub gas payment feature that allows transactions to deduct gas fees from both account stores and payment hubs with smart fallback logic. The implementation enables gas payment prioritization from payment hubs first, then falling back to account stores when insufficient funds are available.
- Introduces a new
transaction_gasmodule that handles enhanced gas deduction and refund logic with payment hub integration - Updates the transaction validator to use the new gas payment system with hub fallback capabilities
- Adds comprehensive integration tests to verify payment hub gas functionality across different scenarios
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frameworks/rooch-framework/sources/transaction_gas.move | New module implementing smart gas payment logic with hub fallback and proportional refunds |
| frameworks/rooch-framework/sources/transaction_validator.move | Updated to use enhanced gas deduction and refund system from transaction_gas module |
| frameworks/rooch-framework/sources/payment_channel.move | Added friend access and helper functions for payment hub gas operations |
| frameworks/rooch-framework/sources/gas_coin.move | Added refund_gas function and friend declaration for transaction_gas module |
| crates/testsuite/tests/integration.rs | Enhanced test framework with numeric comparison operators for comprehensive testing |
| crates/testsuite/features/gas_payment_hub.feature | Comprehensive integration tests covering basic, fallback, and mixed payment scenarios |
|
Docker images for this PR are available:
Pull commands:
|
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.
Summary
resolve #3712