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

upgrade unisat to use testnet omnilock #12

Closed
Tracked by #5
doitian opened this issue Jan 9, 2024 · 0 comments · Fixed by #13
Closed
Tracked by #5

upgrade unisat to use testnet omnilock #12

doitian opened this issue Jan 9, 2024 · 0 comments · Fixed by #13

Comments

@doitian
Copy link
Collaborator

doitian commented Jan 9, 2024

No description provided.

This was referenced Jan 9, 2024
@doitian doitian changed the title upgrade unisat/okx to use testnet omniauth lock upgrade unisat to use testnet omniauth lock Jan 9, 2024
@doitian doitian changed the title upgrade unisat to use testnet omniauth lock upgrade unisat to use testnet omnilock Jan 9, 2024
doitian added a commit that referenced this issue Jan 10, 2024
What's changed:

- Switch to the deployment information of Omnilock
- args: append 00. It is the omni lock flag byte, which indicate there's
  no advanced omni lock features been used.
- `WitnessArgs.lock` size: 65 to 85, this is the size of a
`OmnilockWitnessLock` to only
  save a 65-byte signature.
- witness: instead of storing the 65-byte signature directly into
  `WitnessArgs.lock`, pack it into a `OmnilockWitnessLock`.

Omnilock Contract Error Codes For Reference:

- 8: args format is wrong
- 5: `WitnessArgs.lock` is not a valid `OmnilockWitnessLock`

[An example deposit in
testnet](https://pudge.explorer.nervos.org/transaction/0x7bc9bd9a60852bf85d7142041867fb3d92b44a0d5821835fef9b1978442e84c0)

Omnilock info:

| parameter | value |
| ----------- |
-------------------------------------------------------------------- |
| `code_hash` |
0xf329effd1c475a2978453c8600e1eaf0bc2087ee093c3ee64cc96ec6847752cb |
| `hash_type` | `type` |
| `tx_hash` |
0xff234bf2fb0ad2ab5b356ceda317d3dee3efb2c55b9427ef55d9dcbf6eecbf9f |
| `index` | `0x0` |
| `dep_type` | `code` |

Related PRs:
nervosnetwork/ckb-production-scripts#75

Closes #12
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 a pull request may close this issue.

1 participant