Skip to content

bug: hooks don't get executed for ethflow orders #3388

@MartinquaXD

Description

@MartinquaXD

Problem

User defined hooks associated with ethflow orders don't get executed.

Impact

More advanced use cases that rely on hooks can't be done at the moment with ethflow orders (e.g. swap-and-bridge).

To reproduce

  1. Create an appdata document that contains pre- or post-hooks
  2. upload it to the backend
  3. create ethflow order with that appdata hash
  4. wait for order to get executed
  5. check tenderly / etherscan to see if the hook interactions got executed

Expected behaviour

All hook interactions defined in the appdata hash should be executed.

Additional context

There are 2 ways how orders get added to the backend:

  1. posting the order via the REST API (this is where the appdata handling works correctly)
  2. autopilot indexes ethflow orders from onchain events

We probably don't do the same appdata handling in the second case. We should load the appdata JSON from the DB using the appdata hash signed in the ethflow order and then parse the JSON and store the nicely extracted data the same way we do it in 1.

Also for context interactions are the only pieces of information from the appdata we persist separately in the DB. For things like partner fees and flashloan hints we load the entire appdata associated with an appdata hash and parse it whenever we need it.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtrack:maintenancemaintenance track

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions