-
Notifications
You must be signed in to change notification settings - Fork 43
/
events.proto
125 lines (117 loc) · 5.57 KB
/
events.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
syntax = "proto3";
package greenfield.sp;
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "greenfield/sp/types.proto";
option go_package = "github.com/bnb-chain/greenfield/x/sp/types";
// EventCreateStorageProvider is emitted when there is a storage provider created
message EventCreateStorageProvider {
// sp_id defines the identifier of storage provider which generated on-chain
uint32 sp_id = 1;
// sp_address is the operator address of the storage provider
string sp_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// funding_address is the funding account address of the storage provider
string funding_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// seal_address is the account address for SealObject Tx
string seal_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// approval_address is the account address for approve create bucket/object signature
string approval_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// gc_address defines one of the storage provider's accounts which is used for gc purpose
string gc_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// maintenance_address defines one of the storage provider's accounts which is used for testing while in maintenance mode
string maintenance_address = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// endpoint is the domain name address used by SP to provide storage services
string endpoint = 8;
// total_deposit is the token coin that the storage provider deposit to the storage module
cosmos.base.v1beta1.Coin total_deposit = 9;
// status defines the status of the storage provider
Status status = 10;
// description defines the description terms for the storage provider
Description description = 11 [(gogoproto.nullable) = false];
// bls_key defines the bls pub key owned by storage provider used when sealing object and completing migration
string bls_key = 12;
}
// EventEditStorageProvider is emitted when SP's metadata is edited.
message EventEditStorageProvider {
// sp_id defines the identifier of storage provider which generated on-chain
uint32 sp_id = 1;
// sp_address is the operator address of the storage provider
string sp_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// endpoint is the service endpoint of the storage provider
string endpoint = 3;
// description defines the description terms for the storage provider
Description description = 4 [(gogoproto.nullable) = false];
// seal_address is the account address for SealObject Tx
string seal_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// approval_address is the account address for approve create bucket/object signature
string approval_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// gc_address defines one of the storage provider's accounts which is used for gc purpose
string gc_address = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// maintenance_address defines one of the storage provider's accounts which is used for testing while in maintenance mode
string maintenance_address = 8 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// bls_key defines the bls pub key owned by storage provider used when sealing object
string bls_key = 9;
}
// EventDeposit is emitted when sp deposit tokens.
message EventDeposit {
// funding_address is the funding account address of the storage provider
string funding_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// deposit is the token coin deposited this message
string deposit = 2;
// total_deposit is the total token coins this storage provider deposited
string total_deposit = 3;
}
message EventSpStoragePriceUpdate {
// sp id
uint32 sp_id = 1;
// update time, in unix timestamp
int64 update_time_sec = 2;
// read price, in bnb wei per charge byte
string read_price = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// free read quota, in byte
uint64 free_read_quota = 4;
// store price, in bnb wei per charge byte
string store_price = 5 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
message EventGlobalSpStorePriceUpdate {
// update time, in unix timestamp
int64 update_time_sec = 1;
// read price, in bnb wei per charge byte
string read_price = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// primary store price, in bnb wei per charge byte
string primary_store_price = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
// secondary store price, in bnb wei per charge byte
string secondary_store_price = 4 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
// EventUpdateStorageProviderStatus is emitted when the SP update its status successfully
message EventUpdateStorageProviderStatus {
// sp_id defines the identifier of storage provider which generated on-chain
uint32 sp_id = 1;
// sp_address is the operator address of the storage provider
string sp_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// pre status
string pre_status = 3;
// new status
string new_status = 4;
}