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

feat(proto)!: Add MaxCollateralShare, MinCollateralLiquidity, MaxSupplyUtilization #1159

Merged
merged 41 commits into from
Jul 27, 2022

Conversation

toteki
Copy link
Member

@toteki toteki commented Jul 25, 2022

Adds proto and Token struct updates for three new Token fields

closes: #1095 #1036


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • added appropriate labels to the PR
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Copy link
Member Author

@toteki toteki left a comment

Choose a reason for hiding this comment

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

This has been split off from #1141 - it contains the following:

Mainly:

  • New proto fields
  • Token.Validate for new fields
  • Related errors

Misc:

  • Cleaned up proto comments
  • Shortened MustNewDecFromStr args in various token tests

@toteki toteki changed the title feat!(proto): Add MaxCollateralShare, MinCollateralLiquidity, MaxSupplyUtilization feat(proto)!: Add MaxCollateralShare, MinCollateralLiquidity, MaxSupplyUtilization Jul 25, 2022
@toteki toteki mentioned this pull request Jul 25, 2022
17 tasks
@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2022

Codecov Report

Merging #1159 (5b39275) into main (a250307) will decrease coverage by 0.96%.
The diff coverage is 11.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1159      +/-   ##
==========================================
- Coverage   44.13%   43.17%   -0.97%     
==========================================
  Files          65       65              
  Lines        8367     8574     +207     
==========================================
+ Hits         3693     3702       +9     
- Misses       4430     4628     +198     
  Partials      244      244              
Impacted Files Coverage Δ
x/leverage/keeper/genesis.go 2.58% <0.00%> (ø)
x/leverage/keeper/interest.go 72.00% <ø> (ø)
x/leverage/keeper/invariants.go 57.57% <0.00%> (ø)
x/leverage/types/query.pb.gw.go 0.00% <0.00%> (ø)
x/leverage/keeper/iter.go 53.33% <75.00%> (ø)
x/leverage/client/tests/tests.go 100.00% <100.00%> (ø)
x/leverage/types/token.go 75.00% <100.00%> (+2.41%) ⬆️

CHANGELOG.md Outdated Show resolved Hide resolved
@toteki toteki marked this pull request as ready for review July 25, 2022 01:51
@toteki toteki requested review from a team as code owners July 25, 2022 01:51
Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

We can easily use basis points instead of string. Let's firstly continue with #1149

x/leverage/keeper/iter.go Show resolved Hide resolved
Blacklist bool
MaxCollateralShare sdk.Dec
MaxSupplyUtilization sdk.Dec
MinCollateralLiquidity sdk.Dec
}
Copy link
Member

Choose a reason for hiding this comment

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

instead of copying the structure, let's create a link to generated code. This way it will be easier to keep it in sync.

Copy link
Member

Choose a reason for hiding this comment

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

up

proto/umee/leverage/v1/leverage.proto Outdated Show resolved Hide resolved
proto/umee/leverage/v1/leverage.proto Outdated Show resolved Hide resolved
proto/umee/leverage/v1/leverage.proto Outdated Show resolved Hide resolved
proto/umee/leverage/v1/leverage.proto Outdated Show resolved Hide resolved
@robert-zaremba robert-zaremba linked an issue Jul 26, 2022 that may be closed by this pull request
4 tasks
@toteki toteki mentioned this pull request Jul 26, 2022
4 tasks
Copy link
Collaborator

@adamewozniak adamewozniak left a comment

Choose a reason for hiding this comment

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

utack

@toteki toteki merged commit c526394 into main Jul 27, 2022
@toteki toteki deleted the adam/params branch July 27, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proto for Max Collateral Share Add MaxCollateralUtilization or MinCollateralLiquidity to Token Registry
4 participants