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

Fix simulation contract deployment during broadcast #110

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

mdehoog
Copy link
Contributor

@mdehoog mdehoog commented Dec 11, 2024

The Simulation.sol library had some public methods on it, which causes it to be a separate library contract. This means that anything that interacts with Simulation under a broadcast context (e.g. within vm.startBroadcast()) will deploy the Simulation contract.

This PR switches the library methods from public to internal which causes the library to be embedded in the script, which prevents it from being deployed.

It also more narrowly scopes down the broadcast context to only apply to the single safe.execTransaction to prevent this from happening again in future changes.

Also added a feature that skips signatures from non-owning addresses (and warning via console).

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Dec 12, 2024

✅ 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

@0x00101010 0x00101010 merged commit 4945865 into main Dec 12, 2024
2 checks passed
@0x00101010 0x00101010 deleted the michael/fix-simulation-broadcast branch December 12, 2024 01:12
sebastianst added a commit to ethereum-optimism/superchain-ops that referenced this pull request Jan 7, 2025
github-merge-queue bot pushed a commit to ethereum-optimism/superchain-ops that referenced this pull request Jan 7, 2025
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.

3 participants