Skip to content

Commit bb40cf5

Browse files
committed
Fix documentation of type Coin
1 parent 249b2c3 commit bb40cf5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

types/types.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,14 @@ type CanonicalAddress = []byte
5656

5757
// Coin is a string representation of the sdk.Coin type (more portable than sdk.Int)
5858
type Coin struct {
59-
Denom string `json:"denom"` // type, eg. "ATOM"
60-
Amount string `json:"amount"` // string encoding of decimal value, eg. "12.3456"
59+
// Denom is the denomination string registered in the chain's bank module.
60+
// E.g. "uatom" or "ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2".
61+
Denom string `json:"denom"`
62+
// Amount is a string encoded integer with the number of units of the above denom.
63+
// E.g. "1" or "486451351".
64+
// Before CosmWasm 3 this must fit in an unsigned 128 bit int. From CosmWasm 3 onwards
65+
// it can be any unsigned 256 bit integer. See also https://github.com/CosmWasm/cosmwasm/issues/2366.
66+
Amount string `json:"amount"`
6167
}
6268

6369
func NewCoin(amount uint64, denom string) Coin {

0 commit comments

Comments
 (0)