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(bank): update bank.Metadata - add URI and URIHash #9618

Merged
merged 3 commits into from Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features

* [\#9533](https://github.com/cosmos/cosmos-sdk/pull/9533) Added a new gRPC method, `DenomOwners`, in `x/bank` to query for all account holders of a specific denomination.
* (bank) [\#9618](https://github.com/cosmos/cosmos-sdk/pull/9618) Update bank.Metadata: add URI and URIHash attributes.

### API Breaking Changes

Expand Down
10 changes: 9 additions & 1 deletion docs/core/proto-docs.md
Expand Up @@ -1567,6 +1567,8 @@ a basic token.
| `display` | [string](#string) | | display indicates the suggested denom that should be displayed in clients. |
| `name` | [string](#string) | | name defines the name of the token (eg: Cosmos Atom) |
| `symbol` | [string](#string) | | symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. |
| `uri` | [string](#string) | | URI to a document (on or off-chain) that contains additional information. Optional. |
| `uri_hash` | [string](#string) | | URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. |



Expand Down Expand Up @@ -1709,16 +1711,21 @@ GenesisState defines the bank module's genesis state.
<a name="cosmos.bank.v1beta1.DenomOwner"></a>

### DenomOwner

DenomOwner defines structure representing an account that owns or holds a
particular denominated token. It contains the account address and account
balance of the denominated token.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `address` | [string](#string) | | address defines the address that owns a particular denomination. |
| `balance` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | balance is the balance of the denominated coin for an account. |






<a name="cosmos.bank.v1beta1.QueryAllBalancesRequest"></a>

### QueryAllBalancesRequest
Expand Down Expand Up @@ -8310,3 +8317,4 @@ still be used for delegating and for governance votes even while locked.
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |

5 changes: 5 additions & 0 deletions proto/cosmos/bank/v1beta1/bank.proto
Expand Up @@ -89,4 +89,9 @@ message Metadata {
// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
// be the same as the display.
string symbol = 6;
// URI to a document (on or off-chain) that contains additional information. Optional.
string uri = 7 [(gogoproto.customname) = "URI"];
// URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
// the document didn't change. Optional.
string uri_hash = 8 [(gogoproto.customname) = "URIHash"];
}
185 changes: 147 additions & 38 deletions x/bank/types/bank.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.