You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description
Currently, both autopilot and driver use the same CoW AMM indexer
functionality in parallel to serve different purposes: autopilot needs
to fill out surplus capturing jit order owners in the auction and driver
uses it to fetch tradable tokens and then prepare CoW AMM template
orders. Since autopilot already sends CoW AMM addresses within each
auction, the only missing part is the CoW AMM helper SC address. It can
be received by fetching the CoW AMM factory address and then using a
config mapping to find the helper address. This should also reduce the
RPC traffic.
# Changes
- [ ] Driver now contains only the mapping between AMM factory and
helper SC.
- [ ] When it receives a CoW AMM in the auction, it tries to fetch the
AMM factory address by calling the `FACTORY` function. Since we can now
completely deprecate legacy CoW AMMs, this logic is simplified. I also
used a simple abi to create rust bindings for this interface. The
fetched data is stored in the memory cache.
- [ ] Using the factory address, it gets the helper SC instance based on
the config.
- [ ] Simplify the e2e tests config.
- [ ] Adjusted a forked e2e test to start using the new factory address
with some caveats(the test with its comments should be
self-descriptive).
## How to test
Adjusted forked e2e test.
0 commit comments