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

✨ Migrate to Omnilock #13

Merged
merged 1 commit into from
Jan 10, 2024
Merged

✨ Migrate to Omnilock #13

merged 1 commit into from
Jan 10, 2024

Conversation

doitian
Copy link
Collaborator

@doitian doitian commented Jan 9, 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

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

Copy link

vercel bot commented Jan 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ckb-dao-cobuild-poc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2024 2:03am

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`
@doitian doitian merged commit e0c19cc into develop Jan 10, 2024
20 checks passed
@doitian doitian deleted the feature/omnilock branch January 10, 2024 02:06
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.

upgrade unisat to use testnet omnilock
1 participant