Skip to content
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

fix(ckb/btc): Check rgbpp capacity for change and paymaster cell #168

Merged
merged 3 commits into from
May 14, 2024

Conversation

duanyytop
Copy link
Collaborator

@duanyytop duanyytop commented May 11, 2024

Main Changes

CKB package

  • Add isRgbppCapacitySufficientForChange function to check whether the capacity of inputs is sufficient for outputs
  • Return the rest of the capacity to sender when the RGB++ change cell is needed
  • Determine whether a paymaster cell is needed based on whether the capacity of the inputs is sufficient for the outputs
  • Add checkCkbTxInputsCapacitySufficient function for BTC package to determine whether a paymaster cell is needed

BTC package

  • Update paymaster cell logic with new function checkCkbTxInputsCapacitySufficient

@duanyytop duanyytop force-pushed the fix/check-rgbpp-capacity-enough branch from e737d3b to 9332adb Compare May 11, 2024 07:30
@duanyytop duanyytop requested review from Flouse, ShookLyngs, ahonn and Dawn-githup and removed request for Flouse May 11, 2024 07:31
@Flouse Flouse linked an issue May 11, 2024 that may be closed by this pull request
2 tasks
packages/ckb/src/utils/rgbpp.ts Show resolved Hide resolved
@duanyytop duanyytop force-pushed the fix/check-rgbpp-capacity-enough branch from fba2207 to c25c5d4 Compare May 13, 2024 06:41
@duanyytop duanyytop force-pushed the fix/check-rgbpp-capacity-enough branch from c25c5d4 to 84ee5ad Compare May 13, 2024 06:43
@ShookLyngs ShookLyngs changed the title fix(rgbpp-sdk/ckb): Check rgbpp capacity for change and paymaster cell fix(ckb/btc): Check rgbpp capacity for change and paymaster cell May 13, 2024
@ShookLyngs ShookLyngs requested review from Flouse and ahonn May 13, 2024 07:10
@ShookLyngs ShookLyngs force-pushed the fix/check-rgbpp-capacity-enough branch from d2d46fa to bf7fa04 Compare May 13, 2024 07:29
@duanyytop duanyytop requested a review from ShookLyngs May 13, 2024 08:18
@Flouse Flouse merged commit 66cd1f6 into develop May 14, 2024
1 check passed
@Flouse Flouse deleted the fix/check-rgbpp-capacity-enough branch May 14, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check rgbpp change cell according to capacity of inputs and outputs
4 participants