morpho-org / pre-liquidation

Other
3 stars 1 forks source link

Create an interface for the main contract #8

Closed QGarchery closed 2 months ago

QGarchery commented 2 months ago

A nice feature would be to have an interface for this liquidation protection contract. If the mapping subscriptions is public, then we should use the methodology of morpho-blue where we can fetch structs directly. So this would mean that instead of doing Screenshot from 2024-09-03 12-16-13 we could simply do assertEq(params, liquidationProtection(subscriptions(subscriptionId))); (this example is taken from #3) I can do the PR on top of #3 if we want to go for it

_Originally posted by @QGarchery in https://github.com/morpho-org/morpho-liquidation-protection-poc/pull/1#discussion_r1741805961_

QGarchery commented 2 months ago

Completed in https://github.com/morpho-org/morpho-liquidation-protection-poc/pull/1/commits/abce0a0c9747f5ac3468d8166cee4dc573c7705a