Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(perp): add pair to liquidation failed events #1462

Merged
merged 9 commits into from
Jun 30, 2023

Conversation

Unique-Divine
Copy link
Member

@Unique-Divine Unique-Divine commented Jun 29, 2023

Purpose


Bonus

The sdk doesn't include many useful methods for testing events. This PR implements functions for:

  • ultra descriptive errors when asserts fail on the event manager.
  • easy parsing of typed events to JSON display
  • a comparison function for checking fields of an sdk.Event without knowing its corresponding proto.Message (typed event)

The liquidation failed event was used as the Guinea pig:

wk27-n1700-TabTip_t4wb

feat: We may find it useful to base these methods on proto.Message types and generalize the concept for the common/testutil package.

x/perp/v2/keeper/liquidate.go Show resolved Hide resolved
x/perp/v2/keeper/liquidate.go Outdated Show resolved Hide resolved
@Unique-Divine Unique-Divine marked this pull request as ready for review June 30, 2023 16:51
@Unique-Divine Unique-Divine requested a review from a team as a code owner June 30, 2023 16:51
x/perp/v2/integration/assertion/event.go Outdated Show resolved Hide resolved
x/perp/v2/integration/assertion/event.go Outdated Show resolved Hide resolved
x/perp/v2/keeper/liquidate.go Outdated Show resolved Hide resolved
@Unique-Divine Unique-Divine enabled auto-merge (squash) June 30, 2023 21:38
@Unique-Divine Unique-Divine merged commit c1ee1a9 into master Jun 30, 2023
@Unique-Divine Unique-Divine deleted the realu/fix/liq-pair branch June 30, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants