-
Notifications
You must be signed in to change notification settings - Fork 33
/
withdraw.go
206 lines (161 loc) · 5.43 KB
/
withdraw.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
//nolint:revive,golint
package bridge
import (
"github.com/ethereum/go-ethereum/common"
ethTypes "github.com/ethereum/go-ethereum/core/types"
"github.com/synapsecns/sanguine/core"
"github.com/synapsecns/sanguine/services/explorer/types/bridge"
"math/big"
)
// GetRaw gets the raw event logs from the redeem and remove event.
func (s SynapseBridgeTokenWithdraw) GetRaw() ethTypes.Log {
return s.Raw
}
// GetToken gets the destination chain id from the redeem and remove log.
func (s SynapseBridgeTokenWithdraw) GetToken() common.Address {
return s.Token
}
// GetAmount gets the token amount.
func (s SynapseBridgeTokenWithdraw) GetAmount() *big.Int {
return core.CopyBigInt(s.Amount)
}
// GetEventType gets the type of the redeem event.
func (s SynapseBridgeTokenWithdraw) GetEventType() bridge.EventType {
return bridge.WithdrawEvent
}
// GetFee gets the fee for the token withdraw.
func (s SynapseBridgeTokenWithdraw) GetFee() *big.Int {
return core.CopyBigInt(s.Fee)
}
// GetKappa gets the gappa for the token withdraw.
func (s SynapseBridgeTokenWithdraw) GetKappa() *[32]byte {
return &s.Kappa
}
// GetTxHash gets the unique identifier (txhash) for the withdraw.
func (s SynapseBridgeTokenWithdraw) GetTxHash() common.Hash {
return s.Raw.TxHash
}
// GetBlockNumber gets the block number for the event.
func (s SynapseBridgeTokenWithdraw) GetBlockNumber() uint64 {
return s.Raw.BlockNumber
}
// GetContractAddress gets the contract address the event occurred on.
func (s SynapseBridgeTokenWithdraw) GetContractAddress() common.Address {
return s.Raw.Address
}
// GetRecipient gets the recipient of the withdrawal.
func (s SynapseBridgeTokenWithdraw) GetRecipient() *common.Address {
return &s.To
}
func (s SynapseBridgeTokenWithdraw) GetDestinationChainID() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetTokenIndexFrom() *uint8 {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetTokenIndexTo() *uint8 {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetMinDy() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetDeadline() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetSwapTokenIndex() *uint8 {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetSwapMinAmount() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetSwapDeadline() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetRecipientBytes() *[32]byte {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetSwapSuccess() *bool {
return nil
}
func (s SynapseBridgeTokenWithdraw) GetEventIndex() uint64 {
return uint64(s.Raw.Index)
}
var _ bridge.EventLog = &SynapseBridgeTokenWithdraw{}
// GetToken gets the token for the withdraw and remove operation.
func (s SynapseBridgeTokenWithdrawAndRemove) GetToken() common.Address {
return s.Token
}
// GetAmount gets the amount fo the withdraw.
func (s SynapseBridgeTokenWithdrawAndRemove) GetAmount() *big.Int {
return core.CopyBigInt(s.Amount)
}
// GetEventType gets the withdraw and remove event type.
func (s SynapseBridgeTokenWithdrawAndRemove) GetEventType() bridge.EventType {
return bridge.WithdrawAndRemoveEvent
}
// GetTxHash gets the unique identifier (txhash) for the withdraw and remove.
func (s SynapseBridgeTokenWithdrawAndRemove) GetTxHash() common.Hash {
return s.Raw.TxHash
}
// GetBlockNumber gets the block number for the event.
func (s SynapseBridgeTokenWithdrawAndRemove) GetBlockNumber() uint64 {
return s.Raw.BlockNumber
}
// GetContractAddress gets the contract address the event occurred on.
func (s SynapseBridgeTokenWithdrawAndRemove) GetContractAddress() common.Address {
return s.Raw.Address
}
// GetRaw gets the raw logs.
func (s SynapseBridgeTokenWithdrawAndRemove) GetRaw() ethTypes.Log {
return s.Raw
}
// GetFee gets the fee for the withdraw and remove.
func (s SynapseBridgeTokenWithdrawAndRemove) GetFee() *big.Int {
return core.CopyBigInt(s.Fee)
}
// GetKappa gets the kappa value for the withdraw and remove.
func (s SynapseBridgeTokenWithdrawAndRemove) GetKappa() *[32]byte {
return &s.Kappa
}
// GetRecipient gets the recipient of the withdraw and remove.
func (s SynapseBridgeTokenWithdrawAndRemove) GetRecipient() *common.Address {
return &s.To
}
// GetSwapTokenIndex gets the index of the token to swap.
func (s SynapseBridgeTokenWithdrawAndRemove) GetSwapTokenIndex() *uint8 {
return &s.SwapTokenIndex
}
// GetSwapMinAmount gets the minimum amount to swap.
func (s SynapseBridgeTokenWithdrawAndRemove) GetSwapMinAmount() *big.Int {
return core.CopyBigInt(s.SwapMinAmount)
}
// GetSwapDeadline gets the swap deadline.
func (s SynapseBridgeTokenWithdrawAndRemove) GetSwapDeadline() *big.Int {
return core.CopyBigInt(s.SwapDeadline)
}
// GetSwapSuccess gets the swap success.
func (s SynapseBridgeTokenWithdrawAndRemove) GetSwapSuccess() *bool {
return &s.SwapSuccess
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetDestinationChainID() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetTokenIndexFrom() *uint8 {
return nil
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetTokenIndexTo() *uint8 {
return nil
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetMinDy() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetDeadline() *big.Int {
return nil
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetRecipientBytes() *[32]byte {
return nil
}
func (s SynapseBridgeTokenWithdrawAndRemove) GetEventIndex() uint64 {
return uint64(s.Raw.Index)
}
var _ bridge.EventLog = &SynapseBridgeTokenWithdrawAndRemove{}