-
Notifications
You must be signed in to change notification settings - Fork 4
/
event.go
80 lines (72 loc) · 1.99 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
package types
import sdk "github.com/cosmos/cosmos-sdk/types"
func NewEventDeposit(depositor, claimer string, depositedAmount *sdk.Coin) *EventDeposit {
return &EventDeposit{
Depositor: depositor,
Claimer: claimer,
DepositAmount: depositedAmount,
}
}
func NewEventDelegate(
hostAddress,
validatorAddress string,
delegatedAmount *sdk.Coin,
channelId,
portId string) *EventDelegate {
return &EventDelegate{
HostAddress: hostAddress,
ValidatorAddress: validatorAddress,
DelegatedAmount: delegatedAmount,
ChannelId: channelId,
PortId: portId,
}
}
func NewEventPendingUndelegate(
zoneId, delegator, withdrawer string,
burnedAmount, undelegatedAmount *sdk.Coin,
) *EventPendingUndelegate {
return &EventPendingUndelegate{
ZoneId: zoneId,
Delegator: delegator,
Withdrawer: withdrawer,
BurnedAmount: burnedAmount,
UndelegatedAmount: undelegatedAmount,
}
}
func NewEventUndelegate(
zoneId string, burnedAsset, undelegatedAsset *sdk.Coin) *EventUndelegate {
return &EventUndelegate{
ZoneId: zoneId,
BurnedAmount: burnedAsset,
UndelegatedAmount: undelegatedAsset,
}
}
func NewEventWithdraw(zoneId, withdrawer string, withdrawnAmount *sdk.Coin) *EventWithdraw {
return &EventWithdraw{
ZoneId: zoneId,
Withdrawer: withdrawer,
WithdrawnAmount: withdrawnAmount,
}
}
func NewEventClaimSnToken(claimer string,
claimedToken *sdk.Coin,
oracleVersion uint64) *EventClaimSnToken {
return &EventClaimSnToken{
Claimer: claimer,
ClaimedToken: claimedToken,
OracleVersion: oracleVersion,
}
}
func NewEventIcaWithdraw(hostAddress,
controllerAddress string,
withdrawalToken *sdk.Coin,
connectionId, channelId, portId string) *EventIcaWithdraw {
return &EventIcaWithdraw{
HostAddress: hostAddress,
ControllerAddress: controllerAddress,
WithdrawnToken: withdrawalToken,
ConnectionId: connectionId,
ChannelId: channelId,
PortId: portId,
}
}