Skip to content

Conversation

Hanssen0
Copy link

@Hanssen0 Hanssen0 commented Oct 9, 2025

No description provided.

Copy link

changeset-bot bot commented Oct 9, 2025

⚠️ No Changeset found

Latest commit: 467ba0a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

Summary of Changes

Hello @Hanssen0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates recent developments from the develop branch into main, primarily focusing on optimizing transaction fee management within the RGB++ asset ecosystem. It introduces a unified approach to fee calculation and paymaster cell determination, updates critical CKB contract references, and enhances documentation for improved clarity and user experience. The changes aim to streamline transaction processing and maintain consistency across various asset operations.

Highlights

  • Refactored Fee Calculation Logic: Introduced a new utility function, adjustVirtualTxForTxFee, to centralize and standardize the transaction fee handling across BTC jump to CKB, BTC transfer, Spore leap, and Spore transfer operations. This function intelligently determines whether to deduct fees from the last output or necessitate a paymaster cell.
  • Updated CKB Contract Dependencies: The txHash values for RgbppLockDep, RgbppLockConfigDep, BtcTimeLockDep, and BtcTimeLockConfigDep in packages/ckb/src/constants/index.ts have been updated to reflect the latest contract deployments.
  • Improved Documentation and Service Information: The README.md files for both the main repository and the packages/service directory have been updated with new service URLs, a revised contact email, and clearer guidance on accessing the Bitcoin/RGB++ Assets Service. Links to the unique-cell repository have also been corrected.
  • Enhanced Spore Capacity Calculation: Logic for calculating Spore cell capacity and handling paymaster cells during Spore leap and transfer operations has been refined, including the integration of unpackToRawSporeData from @spore-sdk/core.
  • Witness Handling for Paymaster Cells: The appendPaymasterCellAndSignCkbTx function in packages/ckb/src/rgbpp/ckb-builder.ts was modified to correctly insert the empty witness for paymaster cells, ensuring proper transaction structure.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/test.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request appears to be a merge from the develop branch, introducing a significant refactoring of transaction fee handling, along with several bug fixes and documentation updates. A new centralized function adjustVirtualTxForTxFee has been created to handle fee calculations, improving code consistency and maintainability across different transaction generation functions. Key bug fixes include correct witness placement when using a paymaster cell and properly flagging the need for a paymaster in spore-related transactions. The documentation has also been updated, although one part regarding service access tokens could be clearer. Overall, these changes enhance the robustness and quality of the codebase.

- Signet: [/token/generate](https://api.signet.rgbpp.io/docs/static/index.html#/Token/post_token_generate)

As to the mainnet service, it's currently limited to verified apps only. When your app development is ready on testnet, and requires a mainnet access token, please email us at `f@cell.studio` to request a mainnet JWT token. In the email, please provide the following information about your app:
The testnet/signet services are currently public to access. As to the mainnet service, it's currently limited to verified apps only. When your app development is ready on testnet, and requires a mainnet access token, please email us at [buidl@rgbpp.com](mailto:buidl@rgbpp.com) to request a mainnet JWT token. In the email, please provide the following information about your app:

Choose a reason for hiding this comment

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

medium

The updated documentation is a bit ambiguous. It states that testnet/signet services are "public to access", but removes the instructions on how to get an access token. The example code for initializing the service, which is not part of this change but is in the same file, still uses BtcAssetsApi.fromToken which requires a token.

To avoid confusion for developers, please clarify if a token is still needed for testnet/signet. If it is, it would be helpful to restore the instructions or a link on how to obtain one. If a token is no longer required for testnet, the example code in this file should be updated accordingly in a future PR.

@Hanssen0 Hanssen0 merged commit f557655 into main Oct 9, 2025
6 of 7 checks passed
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.

2 participants