-
Notifications
You must be signed in to change notification settings - Fork 4
/
event.go
97 lines (87 loc) · 3.37 KB
/
event.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
package types
func NewEventRegisterZone(zoneInfo *RegisteredZone) *EventRegisterZone {
return &EventRegisterZone{
ZoneId: zoneInfo.ZoneId,
IcaAccount: zoneInfo.IcaAccount,
TransferInfo: zoneInfo.TransferInfo,
IcaConnectionInfo: zoneInfo.IcaConnectionInfo,
ValidatorAddress: zoneInfo.ValidatorAddress,
Decimal: zoneInfo.Decimal,
SnDenom: zoneInfo.SnDenom,
DepositMaxEntries: zoneInfo.DepositMaxEntries,
UndelegateMaxEntries: zoneInfo.UndelegateMaxEntries,
}
}
func NewEventDeleteZone(zoneInfo *MsgDeleteRegisteredZone) *EventDeleteZone {
return &EventDeleteZone{
ZoneId: zoneInfo.ZoneId,
ControllerAddress: zoneInfo.ControllerAddress,
}
}
func NewEventChangeRegisterZone(zoneInfo *RegisteredZone) *EventChangeRegisteredZone {
return &EventChangeRegisteredZone{
ZoneId: zoneInfo.ZoneId,
IcaInfo: zoneInfo.IcaConnectionInfo,
IcaAccount: zoneInfo.IcaAccount,
TransferInfo: zoneInfo.TransferInfo,
ValidatorAddress: zoneInfo.ValidatorAddress,
BaseDenom: zoneInfo.BaseDenom,
Decimal: zoneInfo.Decimal,
SnDenom: zoneInfo.SnDenom,
UndelegateMaxEntries: zoneInfo.UndelegateMaxEntries,
DepositMaxEntries: zoneInfo.DepositMaxEntries,
}
}
func NewEventIcaAutoStaking(icaAutoStaking *MsgIcaAutoStaking) *EventIcaAutoStaking {
return &EventIcaAutoStaking{
ZoneId: icaAutoStaking.ZoneId,
ControllerAddress: icaAutoStaking.ControllerAddress,
Amount: icaAutoStaking.Amount,
}
}
func NewEventIcaAuthzGrant(icaAuthzGrant *MsgIcaAuthzGrant) *EventIcaAuthzGrant {
return &EventIcaAuthzGrant{
ZoneId: icaAuthzGrant.ZoneId,
ControllerAddress: icaAuthzGrant.ControllerAddress,
Grant: icaAuthzGrant.Grant,
}
}
func NewEventIcaAuthzRevoke(icaAuthzRevoke *MsgIcaAuthzRevoke) *EventIcaAuthzRevoke {
return &EventIcaAuthzRevoke{
ZoneId: icaAuthzRevoke.ZoneId,
Grantee: icaAuthzRevoke.Grantee,
ControllerAddress: icaAuthzRevoke.ControllerAddress,
MsgTypeUrl: icaAuthzRevoke.MsgTypeUrl,
}
}
func NewEventRegisterControllerAddress(controllerAddressInfo *MsgRegisterControllerAddr) *EventRegisterControllerAddress {
return &EventRegisterControllerAddress{
ZoneId: controllerAddressInfo.ZoneId,
ControllerAddress: controllerAddressInfo.ControllerAddress,
FromAddress: controllerAddressInfo.FromAddress,
}
}
func NewEventIcaDelegate(delegateInfo *MsgIcaDelegate) *EventIcaDelegate {
return &EventIcaDelegate{
ZoneId: delegateInfo.ZoneId,
ControllerAddress: delegateInfo.ControllerAddress,
Amount: delegateInfo.Amount,
}
}
func NewEventIcaUndelegate(undelegateInfo *MsgIcaUndelegate) *EventIcaUndelegate {
return &EventIcaUndelegate{
ZoneId: undelegateInfo.ZoneId,
ControllerAddress: undelegateInfo.ControllerAddress,
Amount: undelegateInfo.Amount,
}
}
func NewEventIcaTransfer(transferInfo *MsgIcaTransfer) *EventIcaTransfer {
return &EventIcaTransfer{
ZoneId: transferInfo.ZoneId,
ControllerAddress: transferInfo.ControllerAddress,
ReceiverAddress: transferInfo.ReceiverAddress,
IcaTransferPortId: transferInfo.IcaTransferPortId,
IcaTransferChannelId: transferInfo.IcaTransferChannelId,
Amount: transferInfo.Amount,
}
}