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

Limit the maximum number of tokens that can be locked #49

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

dusan-maksimovic
Copy link
Contributor

  • Store max number of tokens that can be locked in SC config
  • Introduce a new field to keep track of total tokens currently locked in SC (updated on each lock/unlock)
  • Each time a user wants to lock some tokens, we check if the cap has been reached
  • Add new MsgExecute option to allow the value in config to be updated by the whitelist admins
  • Added a query that returns the number of total tokens currently locked
  • Added test

Copy link
Member

@p-offtermatt p-offtermatt left a comment

Choose a reason for hiding this comment

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

LGTM!

I feel like we probably will need to document the endpoints a bit more at some point, but I think for the first version, this is ok. Maybe something naturally comes up when coordinating with the work on the frontend

@dusan-maksimovic dusan-maksimovic merged commit c82abda into main Jul 23, 2024
4 checks passed
@dusan-maksimovic dusan-maksimovic deleted the dusan/max-locked-tokens branch July 23, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants