Skip to content

chore: improve multisig builder transaction simulation building #144

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

Merged
merged 5 commits into from
May 14, 2025

Conversation

jackchuma
Copy link
Contributor

Previously, our transaction simulation for MultisigBuilder setups required a workaround. To simulate a series of transactions through a hierarchy of multisigs using a single multicall, we had to temporarily change the ownership of the very first multisig in the chain to be solely the multicall contract. This allowed the multicall contract to initiate the first approval, which then cascaded up the chain, with each child multisig approving its parent, until the final multisig executed the actual task call(s). While this worked for most simulations, it prevented us from directly testing changes to the real signers of a multisig because our workaround had removed them. This update removes that ownership change. Instead, it directly grants an approval in the initial multisig on behalf of msg.sender, achieving the same simulation capability without losing the ability to manipulate actual signers.

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented May 13, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@jackchuma jackchuma requested review from mdehoog and xenoliss May 13, 2025 20:43
@jackchuma jackchuma requested a review from mdehoog May 13, 2025 23:22
@jackchuma jackchuma requested review from mdehoog and xenoliss May 14, 2025 00:51
@@ -79,14 +79,20 @@ contract DoubleNestedMultisigBuilderTest is Test, DoubleNestedMultisigBuilder {

function test_sign_double_nested_safe1() external {
vm.recordLogs();
sign(safe1, safe3);
bytes memory txData = abi.encodeCall(DoubleNestedMultisigBuilder.sign, (safe1, safe3));
Copy link
Contributor

Choose a reason for hiding this comment

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

A potentially nicer syntax would be DoubleNestedMultisigBuilder(address(this)).sign(safe1, safe3);

@jackchuma jackchuma merged commit cab46f4 into main May 14, 2025
4 checks passed
@jackchuma jackchuma deleted the jack/improve-script-transaction-simulation branch May 14, 2025 01:44
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.

4 participants