-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use network specific config for tests with permit2 #772
Comments
There's currently no Permit2 deployed on avalanche. What shall we do? |
We should deploy it on avalanche! XD Not sure what better option there is actually. I guess we can just skip any test files that use permit 2 in tests that aren't on eth for now. I think we can tackle this problem when we get closer to deploying on avalanche. |
Yes let's skip tests on avalanche for now |
Should we keep this one open? |
Yes, it is still an active issue:
|
I think it's important to keep the avalanche config, as that is currently the only network where rewards can be tested on v3. Maybe we can use a setCode cheatcode. I'll look into it. |
After trying some ideas, I don't think there's a neat way to test Permit2 on avalanche. Permit2 requires --via-ir to compile, and therefore it is not possible to obtain a permit2 bytecode artifact without impacting the time it takes for the testing suite to compile. I thought about just using a precompiled artifact, but this is also problematic because the chain id and address of the contract is used in the constructor of EIP712, and so a precompiled artifact cannot be adjusted for this constructor. Deploying our own permit2 to any other address would conflict with the fact that Permit2Lib hardcodes the address. So in my view, we have these options:
Overall, I think solutions 2 & 3 are just not very practical. |
I'm for solution 1. |
Then how do we skip Permit2 tests on Avalanche now? |
I think you can just add command that check if the network is avalanche you skip compilation of |
I don't think the issue is the |
Just by using |
I thought we didn't know the network until runtime, hence why I was looking for a programmatic way of skipping tests |
No description provided.
The text was updated successfully, but these errors were encountered: