cowprotocol / cow-amm

An automated market maker running on top of CoW Protocol
17 stars 5 forks source link

Remove option of using CoW AMM as ConditionalCoW handler #51

Closed fedgiac closed 7 months ago

fedgiac commented 7 months ago

Part of making CoW AMM standalone (https://github.com/cowprotocol/cow-amm/pull/44).

All infrastructure needed to be a ConditionalCoW handler has been removed. It's only possible to use CoW AMM as a standalone contract. This has led to further simplifications down the line, for example it greatly decreases the number of function parameters needed. It also fixes the issue mentioned in this comment.

Most changes are very simple, but the PR is still very large. For ease of review, I split this PR in three commits that may be reviewed independently (remove ConditionalCoW functions, remove owner parameter, check commitment outside of verify).

How to test

Updated unit tests (there are no new tests). Run coverage and see how (almost) every line is covered (except for approveUnlimited, which is only used in the constructor, because apparently the constructor isn't covered by Foundry's coverage tool).