forked from Finschia/finschia-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.proto
187 lines (169 loc) · 7.22 KB
/
event.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
syntax = "proto3";
package lbm.token.v1;
import "gogoproto/gogo.proto";
import "lbm/token/v1/token.proto";
option go_package = "github.com/line/lbm-sdk/x/token";
// Deprecated: use typed events.
//
// EventType enumerates the valid event types on x/token.
enum EventType {
option (gogoproto.goproto_enum_stringer) = false;
option (gogoproto.goproto_enum_prefix) = false;
EVENT_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "EventTypeUnspecified"];
EVENT_TYPE_ISSUE = 1 [(gogoproto.enumvalue_customname) = "EventTypeIssueToken"];
EVENT_TYPE_MINT = 2 [(gogoproto.enumvalue_customname) = "EventTypeMintToken"];
EVENT_TYPE_BURN = 3 [(gogoproto.enumvalue_customname) = "EventTypeBurnToken"];
EVENT_TYPE_BURN_FROM = 4 [(gogoproto.enumvalue_customname) = "EventTypeBurnTokenFrom"];
EVENT_TYPE_MODIFY_TOKEN = 5 [(gogoproto.enumvalue_customname) = "EventTypeModifyToken"];
EVENT_TYPE_TRANSFER = 6 [(gogoproto.enumvalue_customname) = "EventTypeTransfer"];
EVENT_TYPE_TRANSFER_FROM = 7 [(gogoproto.enumvalue_customname) = "EventTypeTransferFrom"];
EVENT_TYPE_GRANT_PERM = 8 [(gogoproto.enumvalue_customname) = "EventTypeGrantPermToken"];
EVENT_TYPE_REVOKE_PERM = 9 [(gogoproto.enumvalue_customname) = "EventTypeRevokePermToken"];
EVENT_TYPE_APPROVE_TOKEN = 10 [(gogoproto.enumvalue_customname) = "EventTypeApproveToken"];
}
// AttributeKey enumerates the valid attribute keys on x/token.
enum AttributeKey {
option (gogoproto.goproto_enum_stringer) = false;
option (gogoproto.goproto_enum_prefix) = false;
ATTRIBUTE_KEY_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "AttributeKeyUnspecified"];
ATTRIBUTE_KEY_NAME = 1 [(gogoproto.enumvalue_customname) = "AttributeKeyName"];
ATTRIBUTE_KEY_SYMBOL = 2 [(gogoproto.enumvalue_customname) = "AttributeKeySymbol"];
ATTRIBUTE_KEY_META = 3 [(gogoproto.enumvalue_customname) = "AttributeKeyMeta"];
ATTRIBUTE_KEY_CONTRACT_ID = 4 [(gogoproto.enumvalue_customname) = "AttributeKeyContractID"];
ATTRIBUTE_KEY_OWNER = 5 [(gogoproto.enumvalue_customname) = "AttributeKeyOwner"];
ATTRIBUTE_KEY_AMOUNT = 6 [(gogoproto.enumvalue_customname) = "AttributeKeyAmount"];
ATTRIBUTE_KEY_DECIMALS = 7 [(gogoproto.enumvalue_customname) = "AttributeKeyDecimals"];
// deprecated: use ATTRIBUTE_KEY_URI
ATTRIBUTE_KEY_IMG_URI = 8 [(gogoproto.enumvalue_customname) = "AttributeKeyImageURI"];
ATTRIBUTE_KEY_MINTABLE = 9 [(gogoproto.enumvalue_customname) = "AttributeKeyMintable"];
ATTRIBUTE_KEY_FROM = 10 [(gogoproto.enumvalue_customname) = "AttributeKeyFrom"];
ATTRIBUTE_KEY_TO = 11 [(gogoproto.enumvalue_customname) = "AttributeKeyTo"];
ATTRIBUTE_KEY_PERM = 12 [(gogoproto.enumvalue_customname) = "AttributeKeyPerm"];
ATTRIBUTE_KEY_APPROVER = 13 [(gogoproto.enumvalue_customname) = "AttributeKeyApprover"];
ATTRIBUTE_KEY_PROXY = 14 [(gogoproto.enumvalue_customname) = "AttributeKeyProxy"];
ATTRIBUTE_KEY_URI = 15 [(gogoproto.enumvalue_customname) = "AttributeKeyURI"];
}
// EventSent is emitted when tokens are transferred.
//
// Since: 0.46.0 (finschia)
message EventSent {
// contract id associated with the contract.
string contract_id = 1;
// address which triggered the send.
string operator = 2;
// holder whose tokens were sent.
string from = 3;
// recipient of the tokens
string to = 4;
// number of tokens sent.
string amount = 5 [(gogoproto.customtype) = "github.com/line/lbm-sdk/types.Int", (gogoproto.nullable) = false];
}
// EventAuthorizedOperator is emitted when a holder authorizes an operator to manipulate its tokens.
//
// Since: 0.46.0 (finschia)
message EventAuthorizedOperator {
// contract id associated with the contract.
string contract_id = 1;
// address of a holder which authorized the `operator` address as an operator.
string holder = 2;
// address which became an operator of `holder`.
string operator = 3;
}
// EventRevokedOperator is emitted when an authorization is revoked.
//
// Since: 0.46.0 (finschia)
message EventRevokedOperator {
// contract id associated with the contract.
string contract_id = 1;
// address of a holder which revoked the `operator` address as an operator.
string holder = 2;
// address which was revoked as an operator of `holder`.
string operator = 3;
}
// EventIssued is emitted when a new contract is created.
//
// Since: 0.46.0 (finschia)
message EventIssued {
// address which created the contract.
string creator = 1;
// contract id associated with the contract.
string contract_id = 2;
// name defines the human-readable name of the contract.
string name = 3;
// symbol is an abbreviated name for contract.
string symbol = 4;
// uri is an uri for the resource of the contract stored off chain.
string uri = 5;
// meta is a brief description of contract.
string meta = 6;
// decimals is the number of decimals which one must divide the amount by to get its user representation.
int32 decimals = 7;
// mintable represents whether the token is allowed to mint.
bool mintable = 8;
}
// EventGranted is emitted when a granter grants its permission to a grantee.
//
// Info: `granter` would be empty if the permission is granted by an issuance.
//
// Since: 0.46.0 (finschia)
message EventGranted {
// contract id associated with the contract.
string contract_id = 1;
// address which granted the permission to `grantee`.
// it would be empty where the event is triggered by the issuance.
string granter = 2;
// address of the grantee.
string grantee = 3;
// permission on the contract.
Permission permission = 4;
}
// EventRenounced is emitted when a grantee renounces its permission.
//
// Since: 0.46.0 (finschia)
message EventRenounced {
// contract id associated with the contract.
string contract_id = 1;
// address of the grantee which abandons its grant.
string grantee = 2;
// permission on the contract.
Permission permission = 3;
}
// EventMinted is emitted when tokens are minted.
//
// Since: 0.46.0 (finschia)
message EventMinted {
// contract id associated with the contract.
string contract_id = 1;
// address which triggered the mint.
string operator = 2;
// recipient of the tokens.
string to = 3;
// number of tokens minted.
string amount = 4 [(gogoproto.customtype) = "github.com/line/lbm-sdk/types.Int", (gogoproto.nullable) = false];
}
// EventBurned is emitted when tokens are burnt.
//
// Since: 0.46.0 (finschia)
message EventBurned {
// contract id associated with the contract.
string contract_id = 1;
// address which triggered the burn.
string operator = 2;
// holder whose tokens were burned.
string from = 3;
// number of tokens burned.
string amount = 4 [(gogoproto.customtype) = "github.com/line/lbm-sdk/types.Int", (gogoproto.nullable) = false];
}
// EventModified is emitted when the information of a contract is modified.
//
// Since: 0.46.0 (finschia)
message EventModified {
// contract id associated with the contract.
string contract_id = 1;
// address which triggered the modify.
string operator = 2;
// changes on the metadata of the class.
// possible attribute keys are same as those of MsgModify.
// deprecated "img_uri" has been replaced by "uri" in the events.
repeated Attribute changes = 3 [(gogoproto.nullable) = false];
}