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

add opcm regression test #34

Closed

Conversation

prat-gpt
Copy link
Collaborator

Add regression test for opcm template.
closes issue ethereum-optimism#610

blmalone and others added 4 commits February 18, 2025 19:30
* fix: small cleanup improvements.

* Update src/improvements/script/create-template.sh

---------

Co-authored-by: Matt Solomon <[email protected]>
* make check state diff revert, override with empty function

Signed-off-by: Elliot <[email protected]>

* add VmSafe, Vm import

Signed-off-by: Elliot <[email protected]>

* add checkStateDiff function, remove unused variable in checkStateDiff

Signed-off-by: Elliot <[email protected]>

* change MultisigTask based on Solomon's feedback

Signed-off-by: Elliot <[email protected]>

* update simulateRun function signature

Signed-off-by: Elliot <[email protected]>

* update interface to return state diff and accept signatures as a parameter

Signed-off-by: Elliot <[email protected]>

* update multisig task, fix issue in simulate function around signature ordering, add signatures param to simulateRun function

Signed-off-by: Elliot <[email protected]>

* add signature param to simulateRun function call

Signed-off-by: Elliot <[email protected]>

* add multisig to _taskStorageWrites

Signed-off-by: Elliot <[email protected]>

* fix tests, remove call to executeRun

Signed-off-by: Elliot <[email protected]>

* add AccountAccess parameter

Signed-off-by: Elliot <[email protected]>

* add checkStateDiff, add proxyAdminOwner to taskStorageWrites, lock Solidity version

Signed-off-by: Elliot <[email protected]>

* add ignore to forge build for unreachable code and contracts over bytecode limit

Signed-off-by: Elliot <[email protected]>

* add MIT spdx license identifier

Signed-off-by: Elliot <[email protected]>

* add safe to _taskStorageWrites automatically

Signed-off-by: Elliot <[email protected]>

* remove TODO comment

Signed-off-by: Elliot <[email protected]>

* Update src/improvements/tasks/MultisigTask.sol

Co-authored-by: Matt Solomon <[email protected]>

* address Solomon's feedback, add implementation to checkStateDiff, add function isLikelyAddressThatShouldHaveCode and getCodeExceptions

Signed-off-by: Elliot <[email protected]>

* fmt

Signed-off-by: Elliot <[email protected]>

* remove checkStateDiff override

Signed-off-by: Elliot <[email protected]>

* simplify calls to simulateRun

Signed-off-by: Elliot <[email protected]>

* remove build warning flags

Signed-off-by: Elliot <[email protected]>

* rollback changes to simulateRun function call

Signed-off-by: Elliot <[email protected]>

* signFromChildMultisig call to simulateRun does not pass empty sig param

Signed-off-by: Elliot <[email protected]>

* use MultisigTask file instead of ITask

Signed-off-by: Elliot <[email protected]>

* roll back simulateRun function call to previous version

Signed-off-by: Elliot <[email protected]>

* remove empty signature param to simulateRun function call

Signed-off-by: Elliot <[email protected]>

* remove unused imports

Signed-off-by: Elliot <[email protected]>

* update natspec

Signed-off-by: Elliot <[email protected]>

* improve comments

Signed-off-by: Elliot <[email protected]>

* simplify executeRun function

Signed-off-by: Elliot <[email protected]>

* add opcm specific validations

* Update src/improvements/tasks/MultisigTask.sol

Co-authored-by: Matt Solomon <[email protected]>

* add getCodeExceptions

Signed-off-by: Elliot <[email protected]>

* fix mock multisig task, add getCodeExceptions

Signed-off-by: Elliot <[email protected]>

* add mock dispute game upgrade config toml file with EOA address

Signed-off-by: Elliot <[email protected]>

* add MockDisputeGameTask with getCodeExceptions implementation

Signed-off-by: Elliot <[email protected]>

* organize imports

Signed-off-by: Elliot <[email protected]>

* add tests for getCodeException function

Signed-off-by: Elliot <[email protected]>

---------

Signed-off-by: Elliot <[email protected]>
Co-authored-by: Matt Solomon <[email protected]>
Co-authored-by: prateek <[email protected]>
* initial AccountAccessParser

* add eth/erc20 transfer decoding

* cleanup

* more cleanup

* add ProxyOwner addr slot, rename ETHER to match Constants.sol

* make logs match MultisigTask.sol and add checks for empty arrays

* small perf and test UX improvements

* fix pragma, add natspec

* feat: support reverts

* test: add numbering for easier debugging

* chore: more readable tests
@prat-gpt prat-gpt force-pushed the fix/add-opcm-regression branch from c9a9ec8 to 9d76daf Compare February 19, 2025 10:16
prat-gpt and others added 4 commits February 19, 2025 16:14
* fix: using internal rpc urls for forge test

* fix: nested simulated and simulate commands need internal rpc too.

* fix: circle-ci ip ranges true.

* fix: some tasks need sepolia env var.

* fix: pr comments

* fix: syntax error

* fix: syntax error

* fix: syntax error

* fix: syntax error

* fix: r4 job

* fix: using foundry profiles.

* fix: forge_Test

* fix: foundry profile.

* fix: foundry profile.

* fix: forge_Test

* fix: foundry profile fix.
…imism#632)

* fix: Use foundry profile for monorepo integration tests

* fix: remove ETH_RPC_URL

* fix: remove console.

* fix: debugging.

* fix: try again

* fix: nits.
@ElliotFriedman
Copy link

can we close since this PR merged? ethereum-optimism#626

@prat-gpt
Copy link
Collaborator Author

yes.

@prat-gpt prat-gpt closed this Feb 20, 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.

4 participants