forked from prabal-banerjee/go-substrate-rpc-client
-
Notifications
You must be signed in to change notification settings - Fork 4
/
events.go
1311 lines (1149 loc) · 33.8 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
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls
//
// Copyright 2019 Centrifuge GmbH
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package types
import (
"fmt"
"github.com/centrifuge/go-substrate-rpc-client/scale"
)
// EventBalancesEndowed is emitted when an account is created with some free balance
type EventBalancesEndowed struct {
Phase Phase
Who AccountID
Balance U128
Topics []Hash
}
// EventDustLost is emitted when an account is removed with a balance that is
// non-zero but below ExistentialDeposit, resulting in a loss.
type EventBalancesDustLost struct {
Phase Phase
Who AccountID
Balance U128
Topics []Hash
}
// EventBalancesTransfer is emitted when a transfer succeeded (from, to, value)
type EventBalancesTransfer struct {
Phase Phase
From AccountID
To AccountID
Value U128
Topics []Hash
}
// EventBalanceSet is emitted when a balance is set by root
type EventBalancesBalanceSet struct {
Phase Phase
Who AccountID
Free U128
Reserved U128
Topics []Hash
}
// EventDeposit is emitted when an account receives some free balance
type EventBalancesDeposit struct {
Phase Phase
Who AccountID
Balance U128
Topics []Hash
}
// EventBalancesReserved is emitted when some balance was reserved (moved from free to reserved)
type EventBalancesReserved struct {
Phase Phase
Who AccountID
Balance U128
Topics []Hash
}
// EventBalancesUnreserved is emitted when some balance was unreserved (moved from reserved to free)
type EventBalancesUnreserved struct {
Phase Phase
Who AccountID
Balance U128
Topics []Hash
}
// EventBalancesReserveRepatriated is emitted when some balance was moved from the reserve of the first account to the
// second account.
type EventBalancesReserveRepatriated struct {
Phase Phase
From AccountID
To AccountID
Balance U128
DestinationStatus BalanceStatus
Topics []Hash
}
// EventGrandpaNewAuthorities is emitted when a new authority set has been applied
type EventGrandpaNewAuthorities struct {
Phase Phase
NewAuthorities []struct {
AuthorityID AuthorityID
AuthorityWeight U64
}
Topics []Hash
}
// EventGrandpaPaused is emitted when the current authority set has been paused
type EventGrandpaPaused struct {
Phase Phase
Topics []Hash
}
// EventGrandpaResumed is emitted when the current authority set has been resumed
type EventGrandpaResumed struct {
Phase Phase
Topics []Hash
}
// EventImOnlineHeartbeatReceived is emitted when a new heartbeat was received from AuthorityId
type EventImOnlineHeartbeatReceived struct {
Phase Phase
AuthorityID AuthorityID
Topics []Hash
}
// EventImOnlineAllGood is emitted when at the end of the session, no offence was committed
type EventImOnlineAllGood struct {
Phase Phase
Topics []Hash
}
// Exposure lists the own and nominated stake of a validator
type Exposure struct {
Total UCompact
Own UCompact
Others []IndividualExposure
}
// IndividualExposure contains the nominated stake by one specific third party
type IndividualExposure struct {
Who AccountID
Value UCompact
}
// EventImOnlineSomeOffline is emitted when the end of the session, at least once validator was found to be offline
type EventImOnlineSomeOffline struct {
Phase Phase
IdentificationTuples []struct {
ValidatorID AccountID
FullIdentification Exposure
}
Topics []Hash
}
// EventIndicesIndexAssigned is emitted when an index is assigned to an AccountID.
type EventIndicesIndexAssigned struct {
Phase Phase
AccountID AccountID
AccountIndex AccountIndex
Topics []Hash
}
// EventIndicesIndexFreed is emitted when an index is unassigned.
type EventIndicesIndexFreed struct {
Phase Phase
AccountIndex AccountIndex
Topics []Hash
}
// EventIndicesIndexFrozen is emitted when an index is frozen to its current account ID.
type EventIndicesIndexFrozen struct {
Phase Phase
AccountIndex AccountIndex
AccountID AccountID
Topics []Hash
}
// EventOffencesOffence is emitted when there is an offence reported of the given kind happened at the session_index
// and (kind-specific) time slot. This event is not deposited for duplicate slashes
type EventOffencesOffence struct {
Phase Phase
Kind Bytes16
OpaqueTimeSlot Bytes
Topics []Hash
}
// EventSessionNewSession is emitted when a new session has happened. Note that the argument is the session index,
// not the block number as the type might suggest
type EventSessionNewSession struct {
Phase Phase
SessionIndex U32
Topics []Hash
}
// EventStakingEraPayout is emitted when the era payout has been set;
type EventStakingEraPayout struct {
Phase Phase
EraIndex U32
ValidatorPayout U128
Remainder U128
Topics []Hash
}
// EventStakingReward is emitted when the staker has been rewarded by this amount.
type EventStakingReward struct {
Phase Phase
Stash AccountID
Amount U128
Topics []Hash
}
// EventStakingSlash is emitted when one validator (and its nominators) has been slashed by the given amount
type EventStakingSlash struct {
Phase Phase
AccountID AccountID
Balance U128
Topics []Hash
}
// EventStakingOldSlashingReportDiscarded is emitted when an old slashing report from a prior era was discarded because
// it could not be processed
type EventStakingOldSlashingReportDiscarded struct {
Phase Phase
SessionIndex U32
Topics []Hash
}
// EventStakingStakingElection is emitted when a new set of stakers was elected with the given
type EventStakingStakingElection struct {
Phase Phase
Compute ElectionCompute
Topics []Hash
}
// EventStakingSolutionStored is emitted when a new solution for the upcoming election has been stored
type EventStakingSolutionStored struct {
Phase Phase
Compute ElectionCompute
Topics []Hash
}
// EventStakingBonded is emitted when an account has bonded this amount
type EventStakingBonded struct {
Phase Phase
Stash AccountID
Amount U128
Topics []Hash
}
// EventStakingUnbonded is emitted when an account has unbonded this amount
type EventStakingUnbonded struct {
Phase Phase
Stash AccountID
Amount U128
Topics []Hash
}
// EventStakingWithdrawn is emitted when an account has called `withdraw_unbonded` and removed unbonding chunks
// worth `Balance` from the unlocking queue.
type EventStakingWithdrawn struct {
Phase Phase
Stash AccountID
Amount U128
Topics []Hash
}
// EventSystemExtrinsicSuccessV8 is emitted when an extrinsic completed successfully
//
// Deprecated: EventSystemExtrinsicSuccessV8 exists to allow users to simply implement their own EventRecords struct if
// they are on metadata version 8 or below. Use EventSystemExtrinsicSuccess otherwise
type EventSystemExtrinsicSuccessV8 struct {
Phase Phase
Topics []Hash
}
// EventSystemExtrinsicSuccess is emitted when an extrinsic completed successfully
type EventSystemExtrinsicSuccess struct {
Phase Phase
DispatchInfo DispatchInfo
Topics []Hash
}
// DispatchInfo contains a bundle of static information collected from the `#[weight = $x]` attributes.
type DispatchInfo struct {
// Weight of this transaction
Weight Weight
// Class of this transaction
Class DispatchClass
// PaysFee indicates whether this transaction pays fees
PaysFee bool
}
// DispatchClass is a generalized group of dispatch types. This is only distinguishing normal, user-triggered
// transactions (`Normal`) and anything beyond which serves a higher purpose to the system (`Operational`).
type DispatchClass struct {
// A normal dispatch
IsNormal bool
// An operational dispatch
IsOperational bool
}
func (d *DispatchClass) Decode(decoder scale.Decoder) error {
b, err := decoder.ReadOneByte()
if b == 0 {
d.IsNormal = true
} else if b == 1 {
d.IsOperational = true
}
return err
}
func (d DispatchClass) Encode(encoder scale.Encoder) error {
var err error
if d.IsNormal {
err = encoder.PushByte(0)
} else if d.IsOperational {
err = encoder.PushByte(1)
}
return err
}
// EventSystemExtrinsicFailedV8 is emitted when an extrinsic failed
//
// Deprecated: EventSystemExtrinsicFailedV8 exists to allow users to simply implement their own EventRecords struct if
// they are on metadata version 8 or below. Use EventSystemExtrinsicFailed otherwise
type EventSystemExtrinsicFailedV8 struct {
Phase Phase
DispatchError DispatchError
Topics []Hash
}
// EventSystemExtrinsicFailed is emitted when an extrinsic failed
type EventSystemExtrinsicFailed struct {
Phase Phase
DispatchError DispatchError
DispatchInfo DispatchInfo
Topics []Hash
}
// EventSystemCodeUpdated is emitted when the runtime code (`:code`) is updated
type EventSystemCodeUpdated struct {
Phase Phase
Topics []Hash
}
// EventSystemNewAccount is emitted when a new account was created
type EventSystemNewAccount struct {
Phase Phase
Who AccountID
Topics []Hash
}
// EventSystemKilledAccount is emitted when an account is reaped
type EventSystemKilledAccount struct {
Phase Phase
Who AccountID
Topics []Hash
}
// EventAssetIssued is emitted when an asset is issued.
type EventAssetIssued struct {
Phase Phase
AssetID U32
Who AccountID
Balance U128
Topics []Hash
}
// EventAssetTransferred is emitted when an asset is transferred.
type EventAssetTransferred struct {
Phase Phase
AssetID U32
To AccountID
From AccountID
Balance U128
Topics []Hash
}
// EventAssetDestroyed is emitted when an asset is destroyed.
type EventAssetDestroyed struct {
Phase Phase
AssetID U32
Who AccountID
Balance U128
Topics []Hash
}
// EventDemocracyProposed is emitted when a motion has been proposed by a public account.
type EventDemocracyProposed struct {
Phase Phase
ProposalIndex U32
Balance U128
Topics []Hash
}
// EventDemocracyTabled is emitted when a public proposal has been tabled for referendum vote.
type EventDemocracyTabled struct {
Phase Phase
ProposalIndex U32
Balance U128
Accounts []AccountID
Topics []Hash
}
// EventDemocracyExternalTabled is emitted when an external proposal has been tabled.
type EventDemocracyExternalTabled struct {
Phase Phase
Topics []Hash
}
// VoteThreshold is a means of determining if a vote is past pass threshold.
type VoteThreshold byte
const (
// SuperMajorityApprove require super majority of approvals is needed to pass this vote.
SuperMajorityApprove VoteThreshold = 0
// SuperMajorityAgainst require super majority of rejects is needed to fail this vote.
SuperMajorityAgainst VoteThreshold = 1
// SimpleMajority require simple majority of approvals is needed to pass this vote.
SimpleMajority VoteThreshold = 2
)
func (v *VoteThreshold) Decode(decoder scale.Decoder) error {
b, err := decoder.ReadOneByte()
vb := VoteThreshold(b)
switch vb {
case SuperMajorityApprove, SuperMajorityAgainst, SimpleMajority:
*v = vb
default:
return fmt.Errorf("unknown VoteThreshold enum: %v", vb)
}
return err
}
func (v VoteThreshold) Encode(encoder scale.Encoder) error {
return encoder.PushByte(byte(v))
}
// EventDemocracyStarted is emitted when a referendum has begun.
type EventDemocracyStarted struct {
Phase Phase
ReferendumIndex U32
VoteThreshold VoteThreshold
Topics []Hash
}
// EventDemocracyPassed is emitted when a proposal has been approved by referendum.
type EventDemocracyPassed struct {
Phase Phase
ReferendumIndex U32
Topics []Hash
}
// EventDemocracyNotPassed is emitted when a proposal has been rejected by referendum.
type EventDemocracyNotPassed struct {
Phase Phase
ReferendumIndex U32
Topics []Hash
}
// EventDemocracyCancelled is emitted when a referendum has been cancelled.
type EventDemocracyCancelled struct {
Phase Phase
ReferendumIndex U32
Topics []Hash
}
// EventDemocracyExecuted is emitted when a proposal has been enacted.
type EventDemocracyExecuted struct {
Phase Phase
ReferendumIndex U32
Result bool
Topics []Hash
}
// EventDemocracyDelegated is emitted when an account has delegated their vote to another account.
type EventDemocracyDelegated struct {
Phase Phase
Who AccountID
Target AccountID
Topics []Hash
}
// EventDemocracyUndelegated is emitted when an account has cancelled a previous delegation operation.
type EventDemocracyUndelegated struct {
Phase Phase
Target AccountID
Topics []Hash
}
// EventDemocracyVetoed is emitted when an external proposal has been vetoed.
type EventDemocracyVetoed struct {
Phase Phase
Who AccountID
Hash Hash
BlockNumber BlockNumber
Topics []Hash
}
// EventDemocracyPreimageNoted is emitted when a proposal's preimage was noted, and the deposit taken.
type EventDemocracyPreimageNoted struct {
Phase Phase
Hash Hash
AccountID AccountID
Balance U128
Topics []Hash
}
// EventDemocracyPreimageUsed is emitted when a proposal preimage was removed and used (the deposit was returned).
type EventDemocracyPreimageUsed struct {
Phase Phase
Hash Hash
AccountID AccountID
Balance U128
Topics []Hash
}
// EventDemocracyPreimageInvalid is emitted when a proposal could not be executed because its preimage was invalid.
type EventDemocracyPreimageInvalid struct {
Phase Phase
Hash Hash
ReferendumIndex U32
Topics []Hash
}
// EventDemocracyPreimageMissing is emitted when a proposal could not be executed because its preimage was missing.
type EventDemocracyPreimageMissing struct {
Phase Phase
Hash Hash
ReferendumIndex U32
Topics []Hash
}
// EventDemocracyPreimageReaped is emitted when a registered preimage was removed
// and the deposit collected by the reaper (last item).
type EventDemocracyPreimageReaped struct {
Phase Phase
Hash Hash
Provider AccountID
Balance U128
Who AccountID
Topics []Hash
}
// EventDemocracyUnlocked is emitted when an account has been unlocked successfully.
type EventDemocracyUnlocked struct {
Phase Phase
AccountID AccountID
Topics []Hash
}
// EventCollectiveProposed is emitted when a motion (given hash) has been proposed (by given account)
// with a threshold (given `MemberCount`).
type EventCollectiveProposed struct {
Phase Phase
Who AccountID
ProposalIndex U32
Proposal Hash
MemberCount U32
Topics []Hash
}
// EventCollectiveVote is emitted when a motion (given hash) has been voted on by given account, leaving
// a tally (yes votes and no votes given respectively as `MemberCount`).
type EventCollectiveVoted struct {
Phase Phase
Who AccountID
Proposal Hash
Approve bool
YesCount U32
NoCount U32
Topics []Hash
}
// EventCollectiveApproved is emitted when a motion was approved by the required threshold.
type EventCollectiveApproved struct {
Phase Phase
Proposal Hash
Topics []Hash
}
// EventCollectiveDisapproved is emitted when a motion was not approved by the required threshold.
type EventCollectiveDisapproved struct {
Phase Phase
Proposal Hash
Topics []Hash
}
// EventCollectiveExecuted is emitted when a motion was executed; `bool` is true if returned without error.
type EventCollectiveExecuted struct {
Phase Phase
Proposal Hash
Ok bool
Topics []Hash
}
// EventCollectiveMemberExecuted is emitted when a single member did some action;
// `bool` is true if returned without error.
type EventCollectiveMemberExecuted struct {
Phase Phase
Proposal Hash
Ok bool
Topics []Hash
}
// EventCollectiveClosed is emitted when a proposal was closed after its duration was up.
type EventCollectiveClosed struct {
Phase Phase
Proposal Hash
YesCount U32
NoCount U32
Topics []Hash
}
// EventTechnicalCommitteeProposed is emitted when a motion (given hash) has been proposed (by given account)
// with a threshold (given, `MemberCount`)
type EventTechnicalCommitteeProposed struct {
Phase Phase
Account AccountID
ProposalIndex U32
Proposal Hash
Threshold U32
Topics []Hash
}
// EventTechnicalCommitteeVoted is emitted when a motion (given hash) has been voted on by given account, leaving,
// a tally (yes votes and no votes given respectively as `MemberCount`).
type EventTechnicalCommitteeVoted struct {
Phase Phase
Account AccountID
Proposal Hash
Voted bool
YesCount U32
NoCount U32
Topics []Hash
}
// EventTechnicalCommitteeApproved is emitted when a motion was approved by the required threshold.
type EventTechnicalCommitteeApproved struct {
Phase Phase
Proposal Hash
Topics []Hash
}
// EventTechnicalCommitteeDisapproved is emitted when a motion was not approved by the required threshold.
type EventTechnicalCommitteeDisapproved struct {
Phase Phase
Proposal Hash
Topics []Hash
}
// EventTechnicalCommitteeExecuted is emitted when a motion was executed;
// result will be `Ok` if it returned without error.
type EventTechnicalCommitteeExecuted struct {
Phase Phase
Proposal Hash
Result DispatchResult
Topics []Hash
}
// EventTechnicalCommitteeMemberExecuted is emitted when a single member did some action;
// result will be `Ok` if it returned without error
type EventTechnicalCommitteeMemberExecuted struct {
Phase Phase
Proposal Hash
Result DispatchResult
Topics []Hash
}
// EventTechnicalCommitteeClosed is emitted when A proposal was closed because its threshold was reached
// or after its duration was up
type EventTechnicalCommitteeClosed struct {
Phase Phase
Proposal Hash
YesCount U32
NoCount U32
Topics []Hash
}
// EventElectionsNewTerm is emitted when a new term with new members.
// This indicates that enough candidates existed, not that enough have has been elected.
// The inner value must be examined for this purpose.
type EventElectionsNewTerm struct {
Phase Phase
NewMembers []struct {
Member AccountID
Balance U128
}
Topics []Hash
}
// EventElectionsEmpty is emitted when No (or not enough) candidates existed for this round.
type EventElectionsEmptyTerm struct {
Phase Phase
Topics []Hash
}
// EventElectionsMemberKicked is emitted when a member has been removed.
// This should always be followed by either `NewTerm` or `EmptyTerm`.
type EventElectionsMemberKicked struct {
Phase Phase
Member AccountID
Topics []Hash
}
// EventElectionsMemberRenounced is emitted when a member has renounced their candidacy.
type EventElectionsMemberRenounced struct {
Phase Phase
Member AccountID
Topics []Hash
}
// EventElectionsVoterReported is emitted when a voter (first element) was reported (by the second element)
// with the the report being successful or not (third element).
type EventElectionsVoterReported struct {
Phase Phase
Target, Reporter AccountID
Valid bool
Topics []Hash
}
// A name was set or reset (which will remove all judgements).
type EventIdentitySet struct {
Phase Phase
Identity AccountID
Topics []Hash
}
// A name was cleared, and the given balance returned.
type EventIdentityCleared struct {
Phase Phase
Identity AccountID
Balance U128
Topics []Hash
}
// A name was removed and the given balance slashed.
type EventIdentityKilled struct {
Phase Phase
Identity AccountID
Balance U128
Topics []Hash
}
// A judgement was asked from a registrar.
type EventIdentityJudgementRequested struct {
Phase Phase
Sender AccountID
RegistrarIndex U32
Topics []Hash
}
// A judgement request was retracted.
type EventIdentityJudgementUnrequested struct {
Phase Phase
Sender AccountID
RegistrarIndex U32
Topics []Hash
}
// A judgement was given by a registrar.
type EventIdentityJudgementGiven struct {
Phase Phase
Target AccountID
RegistrarIndex U32
Topics []Hash
}
// A registrar was added.
type EventIdentityRegistrarAdded struct {
Phase Phase
RegistrarIndex U32
Topics []Hash
}
// EventIdentitySubIdentityAdded is emitted when a sub-identity was added to an identity and the deposit paid
type EventIdentitySubIdentityAdded struct {
Phase Phase
Sub AccountID
Main AccountID
Deposit U128
Topics []Hash
}
// EventIdentitySubIdentityRemoved is emitted when a sub-identity was removed from an identity and the deposit freed
type EventIdentitySubIdentityRemoved struct {
Phase Phase
Sub AccountID
Main AccountID
Deposit U128
Topics []Hash
}
// EventIdentitySubIdentityRevoked is emitted when a sub-identity was cleared, and the given deposit repatriated from
// the main identity account to the sub-identity account.
type EventIdentitySubIdentityRevoked struct {
Phase Phase
Sub AccountID
Main AccountID
Deposit U128
Topics []Hash
}
// EventSocietyFounded is emitted when the society is founded by the given identity
type EventSocietyFounded struct {
Phase Phase
Founder AccountID
Topics []Hash
}
// EventSocietyBid is emitted when a membership bid just happened. The given account is the candidate's ID
// and their offer is the second
type EventSocietyBid struct {
Phase Phase
Candidate AccountID
Offer U128
Topics []Hash
}
// EventSocietyVouch is emitted when a membership bid just happened by vouching.
// The given account is the candidate's ID and, their offer is the second. The vouching party is the third.
type EventSocietyVouch struct {
Phase Phase
Candidate AccountID
Offer U128
Vouching AccountID
Topics []Hash
}
// EventSocietyAutoUnbid is emitted when a [candidate] was dropped (due to an excess of bids in the system)
type EventSocietyAutoUnbid struct {
Phase Phase
Candidate AccountID
Topics []Hash
}
// EventSocietyUnbid is emitted when a [candidate] was dropped (by their request)
type EventSocietyUnbid struct {
Phase Phase
Candidate AccountID
Topics []Hash
}
// EventSocietyUnvouch is emitted when a [candidate] was dropped (by request of who vouched for them)
type EventSocietyUnvouch struct {
Phase Phase
Candidate AccountID
Topics []Hash
}
// EventSocietyInducted is emitted when a group of candidates have been inducted.
// The batch's primary is the first value, the batch in full is the second.
type EventSocietyInducted struct {
Phase Phase
Primary AccountID
Candidates []AccountID
Topics []Hash
}
// EventSocietySuspendedMemberJudgement is emitted when a suspended member has been judged
type EventSocietySuspendedMemberJudgement struct {
Phase Phase
Who AccountID
Judged bool
Topics []Hash
}
// EventSocietyCandidateSuspended is emitted when a [candidate] has been suspended
type EventSocietyCandidateSuspended struct {
Phase Phase
Candidate AccountID
Topics []Hash
}
// EventSocietyMemberSuspended is emitted when a [member] has been suspended
type EventSocietyMemberSuspended struct {
Phase Phase
Member AccountID
Topics []Hash
}
// EventSocietyChallenged is emitted when a [member] has been challenged
type EventSocietyChallenged struct {
Phase Phase
Member AccountID
Topics []Hash
}
// EventSocietyVote is emitted when a vote has been placed
type EventSocietyVote struct {
Phase Phase
Candidate AccountID
Voter AccountID
Vote bool
Topics []Hash
}
// EventSocietyDefenderVote is emitted when a vote has been placed for a defending member
type EventSocietyDefenderVote struct {
Phase Phase
Voter AccountID
Vote bool
Topics []Hash
}
// EventSocietyNewMaxMembers is emitted when a new [max] member count has been set
type EventSocietyNewMaxMembers struct {
Phase Phase
Max U32
Topics []Hash
}
// EventSocietyUnfounded is emitted when society is unfounded
type EventSocietyUnfounded struct {
Phase Phase
Founder AccountID
Topics []Hash
}
// EventSocietyDeposit is emitted when some funds were deposited into the society account
type EventSocietyDeposit struct {
Phase Phase
Value U128
Topics []Hash
}
// EventRecoveryCreated is emitted when a recovery process has been set up for an account
type EventRecoveryCreated struct {
Phase Phase
Who AccountID
Topics []Hash
}
// EventRecoveryInitiated is emitted when a recovery process has been initiated for account_1 by account_2
type EventRecoveryInitiated struct {
Phase Phase
Account AccountID
Who AccountID
Topics []Hash
}
// EventRecoveryVouched is emitted when a recovery process for account_1 by account_2 has been vouched for by account_3
type EventRecoveryVouched struct {
Phase Phase
Lost AccountID
Rescuer AccountID
Who AccountID
Topics []Hash
}
// EventRecoveryClosed is emitted when a recovery process for account_1 by account_2 has been closed
type EventRecoveryClosed struct {
Phase Phase
Who AccountID
Rescuer AccountID
Topics []Hash
}
// EventRecoveryAccountRecovered is emitted when account_1 has been successfully recovered by account_2
type EventRecoveryAccountRecovered struct {
Phase Phase
Who AccountID
Rescuer AccountID
Topics []Hash
}
// EventRecoveryRemoved is emitted when a recovery process has been removed for an account
type EventRecoveryRemoved struct {
Phase Phase
Who AccountID
Topics []Hash
}
// EventVestingVestingUpdated is emitted when the amount vested has been updated.
// This could indicate more funds are available.
// The balance given is the amount which is left unvested (and thus locked)
type EventVestingVestingUpdated struct {
Phase Phase
Account AccountID
Unvested U128
Topics []Hash
}
// EventVestingVestingCompleted is emitted when an [account] has become fully vested. No further vesting can happen
type EventVestingVestingCompleted struct {
Phase Phase
Account AccountID
Topics []Hash
}
// EventSchedulerScheduled is emitted when scheduled some task
type EventSchedulerScheduled struct {
Phase Phase
When BlockNumber
Index U32
Topics []Hash
}
// EventSchedulerCanceled is emitted when canceled some task
type EventSchedulerCanceled struct {
Phase Phase
When BlockNumber