-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor ckb-sdk-utils by lumos #201
Comments
nervosnetwork/neuron#2734 was closed due to two major reasons:
For the first problem, we could add a new manager for network switching. For the second problem, we need to transform // witness args before transform
const witnessArgs = {
lock: `0x${'00'.repeat(65)}`,
inputType: null,
outputType: null,
}
// witness args after transform
const witnessArgs = {
lock: `0x${'00'.repeat(65)}`,
inputType: undefined,
outputType: undefined,
} In that case, the most certain parts are:
I think maybe we can implement the certain part first |
You mentioned
How many file changes will this refactoring cause? |
I was not very sure about this.
I thouht maybe we can use option 2, and after reading about current code. I find that Neuron is already using option 1:
So now that I can just utilize this and add a
I think it could be one file, providing util functions to transform |
A stateful manager may cause other problems, so maybe we can keep the API the same as before type scriptToAddress = (script:Script, isMainnet?:boolean) => string; And remove the address conversions that were dependent on the
It's LGTM |
The |
https://lumos-website.vercel.app/migrations/migrate-form-ckb-sdk-utils
The text was updated successfully, but these errors were encountered: