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 test for CoW AMM commitment #109

Merged
merged 6 commits into from
May 24, 2024
Merged

Add test for CoW AMM commitment #109

merged 6 commits into from
May 24, 2024

Conversation

fhenneke
Copy link
Contributor

With enabling phase 2 of CoW AMM, solvers can execute CoW AMM orders with custom amounts. This requires commiting and uncommiting the order in the CoW AMM smart contract. Not uncommiting the order is a violation of social consensus rules since it prevents the default order from getting executed.

This PR implements a test where after every settlement which contains a precommit interaction from the CoW AMM address the commited order for that address is checked.

Since there seem to be no commits so far, the code is a bit difficult to test. I added a test with tailored call data.

fhenneke added 2 commits May 17, 2024 17:16
the test fails if a commitment different from the default commitment is set
@fhenneke fhenneke requested a review from harisang May 17, 2024 15:28
@harisang
Copy link
Contributor

Looks good overall. It's hard to be very confident this works but we can merge and see I guess...

Will wait for you to fix the comments before approving.

@fhenneke
Copy link
Contributor Author

I fixed to doc strings. If you approve I would merge and see how it goes.

@fhenneke fhenneke merged commit 03427a7 into main May 24, 2024
4 checks passed
@fhenneke fhenneke deleted the cowamm_commitment branch May 24, 2024 10:07
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants