Skip to content

Pay gas from payment hub#3713

Merged
jolestar merged 6 commits into
mainfrom
pay_gas_from_payment_hub
Sep 23, 2025
Merged

Pay gas from payment hub#3713
jolestar merged 6 commits into
mainfrom
pay_gas_from_payment_hub

Conversation

@jolestar

Copy link
Copy Markdown
Contributor

Summary

resolve #3712

@vercel

vercel Bot commented Sep 22, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rooch-portal-v2.1 Ready Ready Preview Comment Sep 23, 2025 1:53am
test-portal Ready Ready Preview Comment Sep 23, 2025 1:53am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rooch Ignored Ignored Preview Sep 23, 2025 1:53am

@jolestar jolestar requested review from Copilot and removed request for baichuan3, pause125 and wow-sven September 22, 2025 14:46
@github-actions

github-actions Bot commented Sep 22, 2025

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_gas module 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

Comment thread frameworks/rooch-framework/sources/transaction_gas.move
Comment thread frameworks/rooch-framework/sources/payment_channel.move Outdated
Comment thread crates/testsuite/tests/integration.rs Outdated
@github-actions

github-actions Bot commented Sep 22, 2025

Copy link
Copy Markdown

Docker images for this PR are available:

  • ghcr.io/rooch-network/rooch:pr-3713
  • ghcr.io/rooch-network/rooch:pr-3713-fa2a8b1
  • ghcr.io/rooch-network/rooch:pr-3713_debug
  • ghcr.io/rooch-network/rooch:pr-3713-fa2a8b1_debug

Pull commands:

  • docker pull ghcr.io/rooch-network/rooch:pr-3713
  • docker pull ghcr.io/rooch-network/rooch:pr-3713-fa2a8b1
  • docker pull ghcr.io/rooch-network/rooch:pr-3713_debug
  • docker pull ghcr.io/rooch-network/rooch:pr-3713-fa2a8b1_debug

@jolestar jolestar merged commit b4a342e into main Sep 23, 2025
20 of 21 checks passed
@jolestar jolestar deleted the pay_gas_from_payment_hub branch September 23, 2025 03:17
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.

proposal: framework: Support pay gas from payment hub

2 participants