-
Notifications
You must be signed in to change notification settings - Fork 931
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
Foundry SDK for writing end-to-end tests #584
Comments
What exactly do you want to test? Generally, as long as you do not do things like In my opinion, such integration or end-to-end testing only makes sense when you're developing a protocol as an extension of Safe, like Zodiac's DAO protocol designed to work with Safe, so involving Safe's production code is highly beneficial there. Using Safe in that Uniswap test makes little sense to me. Their goal was to test that permit2 works with EIP-1271, and they used the foundry's vm hack to change the storage slot directly... Any wallet could've been used there or even a stub Also, do you have examples of such SDKs? |
Good points. I guess I was mostly looking for a minimal set of helpers, e.g. the Safe factory addresses. While it's true that Safe is a generic type of wallet, that doesn't mean that running fork tests against the actual deployed contracts wouldn't give greater confidence that the protocol behaves as expected. For instance, our protocol uses a different proxy system (PRBProxy) compared to Safe, and so we would find it helpful to check that Safe is compatible with this other proxy.
"SDK" was a stretch - what I meant was test utils. See PRBProxy and Permit2: |
It looks like this might be what I was looking for? |
An example from #710 : https://github.com/colinnielsen/safe-tools |
Context
Scenario: Foundry project in which I want to write end-to-end tests that ensure that our protocol works with Safe.
Proposed solution
Provide a Foundry-based SDK for facilitating end-to-end tests. The SDK should contain:
GnosisSafeProy
Additional context
It looks like Permit2 has a Safe e2e test:
https://github.com/Uniswap/permit2/blob/bbbc92f895049ca45c4b25a450f9d3e907659284/test/integration/GnosisSafe.t.sol
The text was updated successfully, but these errors were encountered: