forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cosmos.proto
144 lines (115 loc) · 4.4 KB
/
cosmos.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
syntax = "proto3";
package cosmos;
import "gogoproto/gogo.proto";
import "tendermint/abci/types/types.proto";
import "google/protobuf/any.proto";
option go_package = "github.com/cosmos/cosmos-sdk/types";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.stringer_all) = false;
// Coin defines a token with a denomination and an amount.
//
// NOTE: The amount field is an Int which implements the custom method
// signatures required by gogoproto.
message Coin {
option (gogoproto.equal) = true;
string denom = 1;
string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
}
// DecCoin defines a token with a denomination and a decimal amount.
//
// NOTE: The amount field is an Dec which implements the custom method
// signatures required by gogoproto.
message DecCoin {
option (gogoproto.equal) = true;
string denom = 1;
string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
}
// IntProto defines a Protobuf wrapper around an Int object.
message IntProto {
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
}
// DecProto defines a Protobuf wrapper around a Dec object.
message DecProto {
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
}
// ValAddresses defines a repeated set of validator addresses.
message ValAddresses {
option (gogoproto.stringer) = true;
repeated bytes addresses = 1 [(gogoproto.casttype) = "ValAddress"];
}
// GasInfo defines tx execution gas context.
message GasInfo {
// GasWanted is the maximum units of work we allow this tx to perform.
uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""];
// GasUsed is the amount of gas actually consumed.
uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""];
}
// Result is the union of ResponseFormat and ResponseCheckTx.
message Result {
option (gogoproto.goproto_getters) = false;
// Data is any data returned from message or handler execution. It MUST be length
// prefixed in order to separate data from multiple message executions.
bytes data = 1;
// Log contains the log information from message or handler execution.
string log = 2;
// Events contains a slice of Event objects that were emitted during message or
// handler execution.
repeated tendermint.abci.types.Event events = 3 [(gogoproto.nullable) = false];
}
// SimulationResponse defines the response generated when a transaction is
// successfully simulated.
message SimulationResponse {
GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
Result result = 2;
}
// MsgData defines the data returned in a Result object during message execution.
message MsgData {
option (gogoproto.stringer) = true;
string msg_type = 1;
bytes data = 2;
}
// TxData defines a list of MsgData. A transaction will have a MsgData object for
// each message.
message TxData {
option (gogoproto.stringer) = true;
repeated MsgData data = 1;
}
// TxResponse defines a structure containing relevant tx data and metadata. The
// tags are stringified and the log is JSON decoded.
message TxResponse {
option (gogoproto.goproto_getters) = false;
int64 height = 1;
string txhash = 2 [(gogoproto.customname) = "TxHash"];
string codespace = 3;
uint32 code = 4;
string data = 5;
string raw_log = 6;
repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false];
string info = 8;
int64 gas_wanted = 9;
int64 gas_used = 10;
google.protobuf.Any tx = 11;
string timestamp = 12;
}
// ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
message ABCIMessageLog {
option (gogoproto.stringer) = true;
uint32 msg_index = 1;
string log = 2;
// Events contains a slice of Event objects that were emitted during some
// execution.
repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false];
}
// StringAttribute defines en Event object wrapper where all the attributes
// contain key/value pairs that are strings instead of raw bytes.
message StringEvent {
option (gogoproto.stringer) = true;
string type = 1;
repeated Attribute attributes = 2 [(gogoproto.nullable) = false];
}
// Attribute defines an attribute wrapper where the key and value are
// strings instead of raw bytes.
message Attribute {
string key = 1;
string value = 2;
}