Skip to content

Nested multisig refactor: have all multisigs submit approveHash#30

Merged
mdehoog merged 2 commits into
mainfrom
michael/dual-approval
Jul 19, 2023
Merged

Nested multisig refactor: have all multisigs submit approveHash#30
mdehoog merged 2 commits into
mainfrom
michael/dual-approval

Conversation

@mdehoog

@mdehoog mdehoog commented Jul 19, 2023

Copy link
Copy Markdown

Currently the NestedMultisigBuilder has threshold - 1 sub-multisigs submit approveHash, and the final multisig executes the tx. This PR refactors that such that all sub-multisig perform the same steps: collect signatures, have a facilitator submit an approveHash tx.

Then finally a facilitator can execute the final tx after a threshold of hashes have been approved. This essentially removes step 3, replacing it with a much simpler step 4.

Also renames the methods for simplicity:

  • signApproval -> sign
  • executeApproval -> approve
  • signTransaction -> REMOVED
  • runTransaction -> run
bytes32 s = bytes32(0);
bytes32 r = bytes32(uint256(uint160(msg.sender)));
_signatures = bytes.concat(_signatures, abi.encodePacked(r, s, v));
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

disables the ability for a final signer can submit the tx... now a threshold of signatures must be collected

@anikaraghu anikaraghu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🙏 this is great!

@mdehoog mdehoog merged commit cb02ab9 into main Jul 19, 2023
@mdehoog mdehoog deleted the michael/dual-approval branch July 19, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants