lindy-labs / opus_contracts

Opus Source Code
https://opus.money
Other
0 stars 0 forks source link

feat: improve trove events #584

Closed tserg closed 3 months ago

tserg commented 3 months ago

This PR aims to improve the design of trove events for integration with the frontend and backend in https://github.com/lindy-labs/opus-infra/pull/13.

tserg commented 3 months ago

At the moment, the changes remove the Enter and Exit events from Gate completely. Alternatively, if we want to retain both events in Gate, I think we can still afford to drop the trove_id member from both events because (1) the indexer can rely primarily on the new Deposit and Withdraw events in Abbot; and (2) we can do away with the DUMMY_TROVE_ID constant in Caretaker.

@milancermak pinging for initial comments

tserg commented 3 months ago

This is really nice. Removing the passing of trove_id just to have it emitted, also removing DUMMY_TROVE_ID 👏

Great! I will clean up the tests and get the PR ready.

tserg commented 3 months ago

Marking ready for review as CI is green on draft.

We will need to redeploy the contracts on Sepolia with these changes, but I think the redeployment can be done together with https://github.com/lindy-labs/opus_contracts/pull/583 in that PR.