Skip to content

Commit

Permalink
docs(x/ecocredit): clarify basket exponent usage to eliminate rounding (
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronc authored Feb 10, 2022
1 parent cb437e4 commit 674da96
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions proto/regen/ecocredit/basket/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ message MsgCreate {
string display_name = 3;

// exponent is the exponent that will be used for converting credits to basket
// tokens and for bank denom metadata. An exponent of 6 will mean that 10^6
// units of a basket token will be issued for 1.0 credits and that
// this should be displayed as one unit in user interfaces. The exponent
// must be >= the precision of the credit type to minimize the need for
// rounding (rounding may still be needed if the precision changes to be greater
// than the exponent).
// tokens and for bank denom metadata. It also limits the precision of
// credit amounts when putting credits into a basket. An exponent of 6 will
// mean that 10^6 units of a basket token will be issued for 1.0 credits and that
// this should be displayed as one unit in user interfaces. It also means
// that the maximum precision of credit amounts is 6 decimal places so that
// the need to round is eliminated. The exponent must be >= the precision of
// the credit type at the time the basket is created.
uint32 exponent = 4;

// disable_auto_retire allows auto-retirement to be disabled.
Expand Down

0 comments on commit 674da96

Please sign in to comment.