forked from ChainSafe/ChainBridge
-
Notifications
You must be signed in to change notification settings - Fork 2
/
events.go
575 lines (503 loc) · 17.7 KB
/
events.go
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
// Copyright 2020 ChainSafe Systems
// SPDX-License-Identifier: LGPL-3.0-only
package utils
import (
events "github.com/Cerebellum-Network/chainbridge-substrate-events"
"github.com/Cerebellum-Network/go-substrate-rpc-client/v9/types"
)
type EventErc721Minted struct {
Phase types.Phase
Owner types.AccountID
TokenId types.U256
Topics []types.Hash
}
type EventErc721Transferred struct {
Phase types.Phase
From types.AccountID
To types.AccountID
TokenId types.U256
Topics []types.Hash
}
type EventErc721Burned struct {
Phase types.Phase
TokenId types.AccountID
Topics []types.Hash
}
type EventErc20Remark struct {
Phase types.Phase
Hash types.Hash
Topics []types.Hash
}
// EventNFTDeposited is emitted when NFT is ready to be deposited to other chain.
type EventNFTDeposited struct {
Phase types.Phase
Asset types.Hash
Topics []types.Hash
}
// EventFeeChanged is emitted when a fee for a given key is changed.
type EventFeeChanged struct {
Phase types.Phase
Key types.Hash
NewPrice types.U128
Topics []types.Hash
}
// EventNewMultiAccount is emitted when a multi account has been created.
// First param is the account that created it, second is the multisig account.
type EventNewMultiAccount struct {
Phase types.Phase
Who, ID types.AccountID
Topics []types.Hash
}
// EventMultiAccountUpdated is emitted when a multi account has been updated. First param is the multisig account.
type EventMultiAccountUpdated struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
// EventMultiAccountRemoved is emitted when a multi account has been removed. First param is the multisig account.
type EventMultiAccountRemoved struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
// EventNewMultisig is emitted when a new multisig operation has begun.
// First param is the account that is approving, second is the multisig account.
type EventNewMultisig struct {
Phase types.Phase
Who, ID types.AccountID
Topics []types.Hash
}
// TimePoint contains height and index
type TimePoint struct {
Height types.U32
Index types.U32
}
// EventMultisigApproval is emitted when a multisig operation has been approved by someone.
// First param is the account that is approving, third is the multisig account.
type EventMultisigApproval struct {
Phase types.Phase
Who types.AccountID
TimePoint TimePoint
ID types.AccountID
Topics []types.Hash
}
// EventMultisigExecuted is emitted when a multisig operation has been executed by someone.
// First param is the account that is approving, third is the multisig account.
type EventMultisigExecuted struct {
Phase types.Phase
Who types.AccountID
TimePoint TimePoint
ID types.AccountID
Result types.DispatchResult
Topics []types.Hash
}
// EventMultisigCancelled is emitted when a multisig operation has been cancelled by someone.
// First param is the account that is approving, third is the multisig account.
type EventMultisigCancelled struct {
Phase types.Phase
Who types.AccountID
TimePoint TimePoint
ID types.AccountID
Topics []types.Hash
}
type EventTreasuryMinting struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
// EventRadClaimsClaimed is emitted when RAD Tokens have been claimed
type EventRadClaimsClaimed struct {
Phase types.Phase
Who types.AccountID
Value types.U128
Topics []types.Hash
}
// EventRadClaimsRootHashStored is emitted when RootHash has been stored for the correspondent RAD Claims batch
type EventRadClaimsRootHashStored struct {
Phase types.Phase
RootHash types.Hash
Topics []types.Hash
}
// EventNftTransferred is emitted when the ownership of the asset has been transferred to the account
type EventNftTransferred struct {
Phase types.Phase
RegistryId RegistryId
AssetId AssetId
Who types.AccountID
Topics []types.Hash
}
// EventRegistryMint is emitted when successfully minting an NFT
type EventRegistryMint struct {
Phase types.Phase
RegistryId RegistryId
TokenId TokenId
Topics []types.Hash
}
// EventRegistryRegistryCreated is emitted when successfully creating a NFT registry
type EventRegistryRegistryCreated struct {
Phase types.Phase
RegistryId RegistryId
Topics []types.Hash
}
// EventRegistryTmp is emitted only for testing
type EventRegistryTmp struct {
Phase types.Phase
Hash types.Hash
Topics []types.Hash
}
type EventDataStringSet struct {
Phase types.Phase
AccountId types.AccountID
Topics []types.Hash
}
type EventDataStringChanged struct {
Phase types.Phase
AccountId types.AccountID
Topics []types.Hash
}
// DDC Payouts events:
type EventBillingReportInitialized struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Topics []types.Hash
}
type EventChargingStarted struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Topics []types.Hash
}
type EventCharged struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventChargeFailed struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Charged types.U128
ExpectedToCharge types.U128
Topics []types.Hash
}
type EventIndebted struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventChargingFinished struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Topics []types.Hash
}
type EventTreasuryFeesCollected struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Amount types.U128
Topics []types.Hash
}
type EventClusterReserveFeesCollected struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Amount types.U128
Topics []types.Hash
}
type EventValidatorFeesCollected struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Amount types.U128
Topics []types.Hash
}
type EventRewardingStarted struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Topics []types.Hash
}
type EventProviderRewarded struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
StoredBytes types.U64
TransferredBytes types.U64
NumberOfPuts types.U64
NumberOfGets types.U64
NodeProviderId types.AccountID
Rewarded types.U128
ExpectedToReward types.U128
Topics []types.Hash
}
type EventValidatorRewarded struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
ValidatorId types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventNotDistributedReward struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
NodeProviderId types.AccountID
ExpectedReward types.U128
DistributedReward types.U128
Topics []types.Hash
}
type EventNotDistributedOverallReward struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
ExpectedReward types.U128
TotalDistributedReward types.U128
Topics []types.Hash
}
type EventRewardingFinished struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Topics []types.Hash
}
type EventBillingReportFinalized struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
Topics []types.Hash
}
type EventAuthorisedCaller struct {
Phase types.Phase
AuthorisedCaller types.AccountID
Topics []types.Hash
}
type EventChargeError struct {
Phase types.Phase
ClusterId types.H160
Era types.U32
BatchIndex types.U32
CustomerId types.AccountID
Amount types.U128
Error types.DispatchError
Topics []types.Hash
}
// DDC Staking events:
type EventBonded struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventUnbonded struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventWithdrawn struct {
Phase types.Phase
Who types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventChilled struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
type EventChillSoon struct {
Phase types.Phase
Who types.AccountID
ClusterId types.H160
BlockNumber types.BlockNumber
Topics []types.Hash
}
type EventActivated struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
type EventLeaveSoon struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
type EventLeft struct {
Phase types.Phase
Who types.AccountID
Topics []types.Hash
}
// DDC Nodes events:
type EventNodeCreated struct {
Phase types.Phase
NodePubKey [32]byte
Topics []types.Hash
}
type EventNodeDeleted struct {
Phase types.Phase
NodePubKey [32]byte
Topics []types.Hash
}
type EventNodeParamsChanged struct {
Phase types.Phase
NodePubKey [32]byte
Topics []types.Hash
}
// DDC Clusters events:
type EventClusterCreated struct {
Phase types.Phase
ClusterId types.H160
Topics []types.Hash
}
type EventClusterNodeAdded struct {
Phase types.Phase
ClusterId types.H160
NodePubKey [32]byte
Topics []types.Hash
}
type EventClusterNodeRemoved struct {
Phase types.Phase
ClusterId types.H160
NodePubKey [32]byte
Topics []types.Hash
}
type EventClusterParamsSet struct {
Phase types.Phase
ClusterId types.H160
Topics []types.Hash
}
type EventClusterGovParamsSet struct {
Phase types.Phase
ClusterId types.H160
Topics []types.Hash
}
// DDC Customers events:
type EventDeposited struct {
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventInitialDepositUnlock struct {
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventCustomersWithdrawn struct {
Phase types.Phase
OwnerId types.AccountID
Amount types.U128
Topics []types.Hash
}
type EventCustomersCharged struct {
Phase types.Phase
OwnerId types.AccountID
Charged types.U128
ExpectedToCharge types.U128
Topics []types.Hash
}
type EventBucketCreated struct {
Phase types.Phase
BucketId types.U64
Topics []types.Hash
}
type EventBucketUpdated struct {
Phase types.Phase
BucketId types.U64
Topics []types.Hash
}
type EventBucketRemoved struct {
Phase types.Phase
BucketId types.U64
Topics []types.Hash
}
type Events struct {
types.EventRecords
events.Events
Erc721_Minted []EventErc721Minted //nolint:stylecheck,golint
Erc721_Transferred []EventErc721Transferred //nolint:stylecheck,golint
Erc721_Burned []EventErc721Burned //nolint:stylecheck,golint
Erc20_Remark []EventErc20Remark //nolint:stylecheck,golint
Nfts_DepositAsset []EventNFTDeposited //nolint:stylecheck,golint
Council_Proposed []types.EventCouncilProposed //nolint:stylecheck,golint
Council_Voted []types.EventCouncilVoted //nolint:stylecheck,golint
Council_Approved []types.EventCouncilApproved //nolint:stylecheck,golint
Council_Disapproved []types.EventCouncilDisapproved //nolint:stylecheck,golint
Council_Executed []types.EventCouncilExecuted //nolint:stylecheck,golint
Council_MemberExecuted []types.EventCouncilMemberExecuted //nolint:stylecheck,golint
Council_Closed []types.EventCouncilClosed //nolint:stylecheck,golint
Fees_FeeChanged []EventFeeChanged //nolint:stylecheck,golint
MultiAccount_NewMultiAccount []EventNewMultiAccount //nolint:stylecheck,golint
MultiAccount_MultiAccountUpdated []EventMultiAccountUpdated //nolint:stylecheck,golint
MultiAccount_MultiAccountRemoved []EventMultiAccountRemoved //nolint:stylecheck,golint
MultiAccount_NewMultisig []EventNewMultisig //nolint:stylecheck,golint
MultiAccount_MultisigApproval []EventMultisigApproval //nolint:stylecheck,golint
MultiAccount_MultisigExecuted []EventMultisigExecuted //nolint:stylecheck,golint
MultiAccount_MultisigCancelled []EventMultisigCancelled //nolint:stylecheck,golint
TreasuryReward_TreasuryMinting []EventTreasuryMinting //nolint:stylecheck,golint
Nft_Transferred []EventNftTransferred //nolint:stylecheck,golint
RadClaims_Claimed []EventRadClaimsClaimed //nolint:stylecheck,golint
RadClaims_RootHashStored []EventRadClaimsRootHashStored //nolint:stylecheck,golint
Registry_Mint []EventRegistryMint //nolint:stylecheck,golint
Registry_RegistryCreated []EventRegistryRegistryCreated //nolint:stylecheck,golint
Registry_RegistryTmp []EventRegistryTmp //nolint:stylecheck,golint
CereDDCModule_DataStringSet []EventDataStringSet //nolint:stylecheck,golint
CereDDCModule_DataStringChanged []EventDataStringChanged //nolint:stylecheck,golint
DdcPayouts_BillingReportInitialized []EventBillingReportInitialized //nolint:stylecheck,golint
DdcPayouts_ChargingStarted []EventChargingStarted //nolint:stylecheck,golint
DdcPayouts_Charged []EventCharged //nolint:stylecheck,golint
DdcPayouts_ChargedFailed []EventChargeFailed //nolint:stylecheck,golint
DdcPayouts_Indebted []EventIndebted //nolint:stylecheck,golint
DdcPayouts_ChargingFinished []EventChargingFinished //nolint:stylecheck,golint
DdcPayouts_TreasuryFeesCollected []EventTreasuryFeesCollected //nolint:stylecheck,golint
DdcPayouts_ClusterReserveFeesCollected []EventClusterReserveFeesCollected //nolint:stylecheck,golint
DdcPayouts_ValidatorFeesCollected []EventValidatorFeesCollected //nolint:stylecheck,golint
DdcPayouts_RewardingStarted []EventRewardingStarted //nolint:stylecheck,golint
DdcPayouts_ProviderRewarded []EventProviderRewarded //nolint:stylecheck,golint
DdcPayouts_ValidatorRewarded []EventValidatorRewarded //nolint:stylecheck,golint
DdcPayouts_NotDistributedReward []EventNotDistributedReward //nolint:stylecheck,golint
DdcPayouts_NotDistributedOverallReward []EventNotDistributedOverallReward //nolint:stylecheck,golint
DdcPayouts_RewardingFinished []EventRewardingFinished //nolint:stylecheck,golint
DdcPayouts_BillingReportFinalized []EventBillingReportFinalized //nolint:stylecheck,golint
DdcPayouts_AuthorisedCaller []EventAuthorisedCaller //nolint:stylecheck,golint
DdcPayouts_ChargeError []EventChargeError //nolint:stylecheck,golint
DdcStaking_Bonded []EventBonded //nolint:stylecheck,golint
DdcStaking_Unbonded []EventUnbonded //nolint:stylecheck,golint
DdcStaking_Withdrawn []EventWithdrawn //nolint:stylecheck,golint
DdcStaking_Chilled []EventChilled //nolint:stylecheck,golint
DdcStaking_ChillSoon []EventChillSoon //nolint:stylecheck,golint
DdcStaking_Activated []EventActivated //nolint:stylecheck,golint
DdcStaking_LeaveSoon []EventLeaveSoon //nolint:stylecheck,golint
DdcStaking_Left []EventLeft //nolint:stylecheck,golint
DdcNodes_NodeCreated []EventNodeCreated //nolint:stylecheck,golint
DdcNodes_NodeDeleted []EventNodeDeleted //nolint:stylecheck,golint
DdcNodes_NodeParamsChanged []EventNodeParamsChanged //nolint:stylecheck,golint
DdcClusters_ClusterCreated []EventClusterCreated //nolint:stylecheck,golint
DdcClusters_ClusterNodeAdded []EventClusterNodeAdded //nolint:stylecheck,golint
DdcClusters_ClusterNodeRemoved []EventClusterNodeRemoved //nolint:stylecheck,golint
DdcClusters_ClusterParamsSet []EventClusterParamsSet //nolint:stylecheck,golint
DdcClusters_EventClusterGovParamsSet []EventClusterGovParamsSet //nolint:stylecheck,golint
DdcCustomers_Deposited []EventDeposited //nolint:stylecheck,golint
DdcCustomers_InitialDepositUnlock []EventInitialDepositUnlock //nolint:stylecheck,golint
DdcCustomers_Withdrawn []EventCustomersWithdrawn //nolint:stylecheck,golint
DdcCustomers_Charged []EventCustomersCharged //nolint:stylecheck,golint
DdcCustomers_BucketCreated []EventBucketCreated //nolint:stylecheck,golint
DdcCustomers_BucketUpdated []EventBucketUpdated //nolint:stylecheck,golint
DdcCustomers_BucketRemoved []EventBucketRemoved //nolint:stylecheck,golint
}