From 674da96e9b1b8aeefeedc97364141d7968b48442 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 10 Feb 2022 13:20:12 -0500 Subject: [PATCH] docs(x/ecocredit): clarify basket exponent usage to eliminate rounding (#752) --- proto/regen/ecocredit/basket/v1/tx.proto | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/proto/regen/ecocredit/basket/v1/tx.proto b/proto/regen/ecocredit/basket/v1/tx.proto index 1a253de616..54f13f3be3 100644 --- a/proto/regen/ecocredit/basket/v1/tx.proto +++ b/proto/regen/ecocredit/basket/v1/tx.proto @@ -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.