Skip to content

Commit 1d22021

Browse files
Copilotmichaelfig
andcommitted
Update cosmic-proto with vbank msgs.proto definitions
Co-authored-by: michaelfig <457244+michaelfig@users.noreply.github.com>
1 parent 80dd2bc commit 1d22021

1 file changed

Lines changed: 60 additions & 2 deletions

File tree

  • packages/cosmic-proto/proto/agoric/vbank
Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,65 @@
11
syntax = "proto3";
22
package agoric.vbank;
33

4+
import "amino/amino.proto";
5+
import "cosmos/msg/v1/msg.proto";
6+
import "cosmos_proto/cosmos.proto";
7+
import "gogoproto/gogo.proto";
8+
49
option go_package = "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types";
510

6-
// No transactions.
7-
service Msg {}
11+
// Msg defines the vbank Msg service.
12+
service Msg {
13+
option (cosmos.msg.v1.service) = true;
14+
15+
// SetDenomMetaData defines a governance operation for setting the metadata for a denom.
16+
// The authority is defined in the keeper.
17+
rpc SetDenomMetaData(MsgSetDenomMetaData) returns (MsgSetDenomMetaDataResponse);
18+
}
19+
20+
// DenomUnit represents a struct that describes a given denomination unit of the basic token.
21+
message DenomUnit {
22+
// denom represents the string name of the given denom unit (e.g uatom).
23+
string denom = 1;
24+
// exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given
25+
// DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit
26+
// of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom).
27+
uint32 exponent = 2;
28+
// aliases is a list of string aliases for the given denom
29+
repeated string aliases = 3;
30+
}
31+
32+
// Metadata represents a struct that describes a basic token.
33+
message Metadata {
34+
string description = 1;
35+
// denom_units represents the list of DenomUnit's for a given coin
36+
repeated DenomUnit denom_units = 2;
37+
// base represents the base denom (should be the DenomUnit with exponent = 0).
38+
string base = 3;
39+
// display indicates the suggested denom that should be displayed in clients.
40+
string display = 4;
41+
// name defines the name of the token (eg: Cosmos Atom)
42+
string name = 5;
43+
// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display.
44+
string symbol = 6;
45+
// URI to a document (on or off-chain) that contains additional information. Optional.
46+
string uri = 7 [(gogoproto.customname) = "URI"];
47+
// URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change.
48+
// Optional.
49+
string uri_hash = 8 [(gogoproto.customname) = "URIHash"];
50+
}
51+
52+
// MsgSetDenomMetaData represents a message to set the metadata for a denom.
53+
message MsgSetDenomMetaData {
54+
option (cosmos.msg.v1.signer) = "authority";
55+
option (amino.name) = "agoric/vbank/MsgSetDenomMetaData";
56+
57+
// authority is the address that controls the module (defaults to x/gov unless overwritten).
58+
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
59+
60+
// metadata is the bank denom metadata to set.
61+
Metadata metadata = 2 [(gogoproto.nullable) = false];
62+
}
63+
64+
// MsgSetDenomMetaDataResponse is the response type for the Msg/SetDenomMetaData RPC method.
65+
message MsgSetDenomMetaDataResponse {}

0 commit comments

Comments
 (0)