-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat(rgbpp-ckb): build btc transfer virtual ckb tx #13
Conversation
8109ab3
to
052be60
Compare
052be60
to
ffc7a21
Compare
In the design documentation, BTC is referred to as Layer 1 (L1). To avoid conceptual confusion, I suggest:
|
Co-authored-by: Flouse <[email protected]>
I will add more test cases when the test cases of RGBPP lock script are finished |
packages/ckb/src/collector/index.ts
Outdated
if (sumAmount < needAmount) { | ||
throw new UdtAmountNotEnoughError('Insufficient UDT balance'); | ||
} | ||
return { inputs, capacity: sumCapacity, amount: sumAmount }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated ec07a01
const transactionHash = rawTransactionToHash(rawTx); | ||
const signedWitnesses = signWitnesses(keyMap)({ | ||
transactionHash, | ||
witnesses: rawTx.witnesses, | ||
inputCells: cells, | ||
skipMissingKeys: true, | ||
}); | ||
const emptyWitness = { lock: '', inputType: '', outputType: '' }; | ||
const signedTx = { | ||
...rawTx, | ||
witnesses: signedWitnesses.map((witness, index) => (index === 0 ? serializeWitnessArgs(emptyWitness) : witness)), | ||
}; | ||
return signedTx; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need test cases later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The integration test will be added later and I think we should focus on the new features now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -42,7 +42,7 @@ jobs: | |||
|
|||
- name: Install dependencies | |||
run: pnpm i | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test workflow doesn't seem to have any significant changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding an empty line will be more clear and I don't think it's a bad thing. Do you think so ?
If you think it's necessary to remove the empty line, I will do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree with you. I think breaking steps with an empty line is clearer than collapsing them together. However, I noticed that the only change in the test.yaml
file in the PR is the addition of more spaces on line 45, rather than adding more line breaks as you suggested.
- The
test.yaml
file in the main branch: https://github.com/ckb-cell/rgbpp-sdk/blob/f67460f3e4a2cc1620ea1a59baaa14bc78b51d32/.github/workflows/test.yaml#L43-L47 - The
test.yaml
in the current PR: https://github.com/ckb-cell/rgbpp-sdk/blob/dabbb8a4346c30b1416437a13ac3f412cebfce04/.github/workflows/test.yaml#L43-L47
If the PR contains noticeable or significant changes, please include a |
We don’t have enough time now, and there are still many features that need to be implemented. I don’t think adding the changeset which only includes the PR's name is necessary. What do you think? @Flouse |
Yes, we can follow @ShookLyngs 's suggestion once we are ready to open source. |
Changes
Reviewers
@ShookLyngs @ahonn @Flouse