Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add reward module endpoint - Closes #6689 #6751

Merged

Conversation

mehmetegemen
Copy link
Contributor

What was the problem?

This PR resolves #6689

How was it solved?

  • Added getDefaultRewardAtHeight function and injected necessary configs for it

How was it tested?

  • With a unit test that tests every bracket and offset range
  • With a unit test that tests module config is properly imported

@mehmetegemen mehmetegemen requested a review from shuse2 September 8, 2021 11:42
@mehmetegemen mehmetegemen self-assigned this Sep 8, 2021
@shuse2 shuse2 requested a review from ishantiw September 8, 2021 11:48
@shuse2 shuse2 linked an issue Sep 8, 2021 that may be closed by this pull request
Reward calculation logic will also be used by the API. We prefered
config injection to endpoint and then passing injected configs to
separated function instead of passing a function to endpoint
that is bound to config variables. That way we preserved type safety
and flexibility of using config vars later in the different places of
the endpoint.
@mehmetegemen mehmetegemen requested a review from shuse2 September 9, 2021 07:52
Copy link
Contributor

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Collaborator

@shuse2 shuse2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than @ishantiw 's comment LGTM

@shuse2 shuse2 merged commit d50cfd7 into feature/6554-improve-framework-architecture Sep 9, 2021
@shuse2 shuse2 deleted the 6689-reward-endpoint branch September 9, 2021 08:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Reward Module endpoint
3 participants