Skip to content

Upgrade multisig #140

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eval-exec
Copy link
Contributor

@eval-exec eval-exec commented Apr 21, 2025

This PR want to add MultisigScript enum to ckb-sdk:

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MultisigScript {
    /// Multisig Script deployed on Genesis Block
    /// https://explorer.nervos.org/script/0x5c5069eb0857efc65e1bca0c07df34c31663b3622fd3876c876320fc9634e2a8/type
    Legacy,

    /// Latest multisig script, Enhance multisig handling for optional since value
    /// https://github.com/nervosnetwork/ckb-system-scripts/pull/99
    /// https://explorer.nervos.org/script/0x36c971b8d41fbd94aabca77dc75e826729ac98447b46f91e00796155dddb0d29/data1
    V2,
}

And introduce a breaking change: constructing a MultisigConfig now requires specifying a MultisigScript variant.

before:

    let config = MultisigConfig::new_with(
                    sighash_addresses,
                    args.require_first_n,
                    args.threshold,
                )?

In this PR:

    let config = MultisigConfig::new_with(
                    MultisigScript::Legacy, // Or MultisigScript::V2
                    sighash_addresses,
                    args.require_first_n,
                    args.threshold,
                )?

@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch from 9a734fd to 62b34c4 Compare April 21, 2025 04:45
@eval-exec eval-exec marked this pull request as draft April 21, 2025 04:48
@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch 11 times, most recently from 448a617 to 374228c Compare April 24, 2025 05:29
@eval-exec
Copy link
Contributor Author

eval-exec commented Apr 24, 2025

Invite @doitian, @zhangsoledad, @driftluo , @quake to review.

@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch 2 times, most recently from c5d3184 to efe2326 Compare April 24, 2025 06:16
@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch from efe2326 to 04d0654 Compare April 24, 2025 07:08
@doitian doitian requested a review from Copilot April 28, 2025 07:27
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch 7 times, most recently from 4ca9c9c to f56c42f Compare May 13, 2025 08:51
@eval-exec eval-exec marked this pull request as ready for review May 20, 2025 04:28
@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch 3 times, most recently from 7a4742a to ac28ed4 Compare May 21, 2025 10:34
Signed-off-by: Eval EXEC <[email protected]>
@eval-exec eval-exec force-pushed the exec/upgrade-multisig branch from ac28ed4 to 3f1790c Compare May 22, 2025 03:53
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.

2 participants