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

Add minimumCollateralPercentage to ProtocolParameters. #2935

Merged

Conversation

jonathanknowles
Copy link
Contributor

@jonathanknowles jonathanknowles commented Sep 30, 2021

Issue Number

ADP-1166

Summary

This PR:

  • adds a minimumCollateralPercentage field to the ProtocolParameters type, and exposes this parameter in the API.
  • adds a minimumCollateralPercentage field to the CoinSelection.SelectionConstraints type, and populates it in Wallet.selectAssets.

Notes

This PR does not use our internal Percentage type, since:

  • the Percentage type has a maxBound that corresponds to 100%, but the minimumCollateralPercentage protocol parameter has no such upper bound.
  • the Percentage type makes it possible to encode fractions of a percent, but the minimumCollateralPercentage protocol parameter only allows whole percentage points (it's a natural number).

@jonathanknowles jonathanknowles self-assigned this Sep 30, 2021
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/adp-1116/minimum-collateral-percentage branch from 1bc2e6a to b49d57c Compare September 30, 2021 04:50
This commit adds the `minimumCollateralPercentage` field to the
`SelectionConstraints` record type of `CoinSelection`, and populates the
field with the protocol parameter in `Cardano.Wallet`.
@jonathanknowles
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 30, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit e7375f5 into master Sep 30, 2021
@iohk-bors iohk-bors bot deleted the jonathanknowles/adp-1116/minimum-collateral-percentage branch September 30, 2021 08:31
WilliamKingNoel-Bot pushed a commit that referenced this pull request Sep 30, 2021
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