-
Notifications
You must be signed in to change notification settings - Fork 7
/
ProviderMock_test.go
308 lines (253 loc) · 7.21 KB
/
ProviderMock_test.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
// Code generated by mockery v1.0.0. DO NOT EDIT.
package zksync
import (
big "math/big"
common "github.com/ethereum/go-ethereum/common"
mock "github.com/stretchr/testify/mock"
)
// ProviderMock is an autogenerated mock type for the Provider type
type ProviderMock struct {
mock.Mock
}
// ContractAddress provides a mock function with given fields:
func (_m *ProviderMock) ContractAddress() (*ContractAddress, error) {
ret := _m.Called()
var r0 *ContractAddress
if rf, ok := ret.Get(0).(func() *ContractAddress); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ContractAddress)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetConfirmationsForEthOpAmount provides a mock function with given fields:
func (_m *ProviderMock) GetConfirmationsForEthOpAmount() (*big.Int, error) {
ret := _m.Called()
var r0 *big.Int
if rf, ok := ret.Get(0).(func() *big.Int); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*big.Int)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetEthOpInfo provides a mock function with given fields: priority
func (_m *ProviderMock) GetEthOpInfo(priority uint64) (*EthOpInfo, error) {
ret := _m.Called(priority)
var r0 *EthOpInfo
if rf, ok := ret.Get(0).(func(uint64) *EthOpInfo); ok {
r0 = rf(priority)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*EthOpInfo)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(uint64) error); ok {
r1 = rf(priority)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetState provides a mock function with given fields: address
func (_m *ProviderMock) GetState(address common.Address) (*AccountState, error) {
ret := _m.Called(address)
var r0 *AccountState
if rf, ok := ret.Get(0).(func(common.Address) *AccountState); ok {
r0 = rf(address)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*AccountState)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(common.Address) error); ok {
r1 = rf(address)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTokenPrice provides a mock function with given fields: token
func (_m *ProviderMock) GetTokenPrice(token *Token) (*big.Float, error) {
ret := _m.Called(token)
var r0 *big.Float
if rf, ok := ret.Get(0).(func(*Token) *big.Float); ok {
r0 = rf(token)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*big.Float)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*Token) error); ok {
r1 = rf(token)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTokens provides a mock function with given fields:
func (_m *ProviderMock) GetTokens() (*Tokens, error) {
ret := _m.Called()
var r0 *Tokens
if rf, ok := ret.Get(0).(func() *Tokens); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*Tokens)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTransactionDetails provides a mock function with given fields: txHash
func (_m *ProviderMock) GetTransactionDetails(txHash string) (*TransactionDetails, error) {
ret := _m.Called(txHash)
var r0 *TransactionDetails
if rf, ok := ret.Get(0).(func(string) *TransactionDetails); ok {
r0 = rf(txHash)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*TransactionDetails)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(txHash)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTransactionFee provides a mock function with given fields: txType, address, token
func (_m *ProviderMock) GetTransactionFee(txType TransactionType, address common.Address, token *Token) (*TransactionFeeDetails, error) {
ret := _m.Called(txType, address, token)
var r0 *TransactionFeeDetails
if rf, ok := ret.Get(0).(func(TransactionType, common.Address, *Token) *TransactionFeeDetails); ok {
r0 = rf(txType, address, token)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*TransactionFeeDetails)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(TransactionType, common.Address, *Token) error); ok {
r1 = rf(txType, address, token)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTransactionsBatchFee provides a mock function with given fields: txTypes, addresses, token
func (_m *ProviderMock) GetTransactionsBatchFee(txTypes []TransactionType, addresses []common.Address, token *Token) (*TransactionFeeDetails, error) {
ret := _m.Called(txTypes, addresses, token)
var r0 *TransactionFeeDetails
if rf, ok := ret.Get(0).(func([]TransactionType, []common.Address, *Token) *TransactionFeeDetails); ok {
r0 = rf(txTypes, addresses, token)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*TransactionFeeDetails)
}
}
var r1 error
if rf, ok := ret.Get(1).(func([]TransactionType, []common.Address, *Token) error); ok {
r1 = rf(txTypes, addresses, token)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SubmitTx provides a mock function with given fields: signedTx, ethSignature, fastProcessing
func (_m *ProviderMock) SubmitTx(signedTx ZksTransaction, ethSignature *EthSignature, fastProcessing bool) (string, error) {
ret := _m.Called(signedTx, ethSignature, fastProcessing)
var r0 string
if rf, ok := ret.Get(0).(func(ZksTransaction, *EthSignature, bool) string); ok {
r0 = rf(signedTx, ethSignature, fastProcessing)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(ZksTransaction, *EthSignature, bool) error); ok {
r1 = rf(signedTx, ethSignature, fastProcessing)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SubmitTxMultiSig provides a mock function with given fields: signedTx, ethSignatures
func (_m *ProviderMock) SubmitTxMultiSig(signedTx ZksTransaction, ethSignatures ...*EthSignature) (string, error) {
_va := make([]interface{}, len(ethSignatures))
for _i := range ethSignatures {
_va[_i] = ethSignatures[_i]
}
var _ca []interface{}
_ca = append(_ca, signedTx)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 string
if rf, ok := ret.Get(0).(func(ZksTransaction, ...*EthSignature) string); ok {
r0 = rf(signedTx, ethSignatures...)
} else {
r0 = ret.Get(0).(string)
}
var r1 error
if rf, ok := ret.Get(1).(func(ZksTransaction, ...*EthSignature) error); ok {
r1 = rf(signedTx, ethSignatures...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SubmitTxsBatch provides a mock function with given fields: signedTxs, ethSignature
func (_m *ProviderMock) SubmitTxsBatch(signedTxs []*SignedTransaction, ethSignature *EthSignature) ([]string, error) {
ret := _m.Called(signedTxs, ethSignature)
var r0 []string
if rf, ok := ret.Get(0).(func([]*SignedTransaction, *EthSignature) []string); ok {
r0 = rf(signedTxs, ethSignature)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func([]*SignedTransaction, *EthSignature) error); ok {
r1 = rf(signedTxs, ethSignature)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateTokenSet provides a mock function with given fields:
func (_m *ProviderMock) UpdateTokenSet() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}