-
Notifications
You must be signed in to change notification settings - Fork 2
/
gravity_contract.go
261 lines (224 loc) · 9.97 KB
/
gravity_contract.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/cicizeo/loran/orchestrator/ethereum/gravity (interfaces: Contract)
// Package gravity is a generated GoMock package.
package gravity
import (
context "context"
big "math/big"
reflect "reflect"
time "time"
types "github.com/Gravity-Bridge/Gravity-Bridge/module/x/gravity/types"
common "github.com/ethereum/go-ethereum/common"
gomock "github.com/golang/mock/gomock"
gravity "github.com/cicizeo/loran/orchestrator/ethereum/gravity"
provider "github.com/cicizeo/loran/orchestrator/ethereum/provider"
)
// MockContract is a mock of Contract interface.
type MockContract struct {
ctrl *gomock.Controller
recorder *MockContractMockRecorder
}
// MockContractMockRecorder is the mock recorder for MockContract.
type MockContractMockRecorder struct {
mock *MockContract
}
// NewMockContract creates a new mock instance.
func NewMockContract(ctrl *gomock.Controller) *MockContract {
mock := &MockContract{ctrl: ctrl}
mock.recorder = &MockContractMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockContract) EXPECT() *MockContractMockRecorder {
return m.recorder
}
// Address mocks base method.
func (m *MockContract) Address() common.Address {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Address")
ret0, _ := ret[0].(common.Address)
return ret0
}
// Address indicates an expected call of Address.
func (mr *MockContractMockRecorder) Address() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockContract)(nil).Address))
}
// EncodeTransactionBatch mocks base method.
func (m *MockContract) EncodeTransactionBatch(arg0 context.Context, arg1 types.Valset, arg2 types.OutgoingTxBatch, arg3 []types.MsgConfirmBatch) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EncodeTransactionBatch", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// EncodeTransactionBatch indicates an expected call of EncodeTransactionBatch.
func (mr *MockContractMockRecorder) EncodeTransactionBatch(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncodeTransactionBatch", reflect.TypeOf((*MockContract)(nil).EncodeTransactionBatch), arg0, arg1, arg2, arg3)
}
// EncodeValsetUpdate mocks base method.
func (m *MockContract) EncodeValsetUpdate(arg0 context.Context, arg1, arg2 types.Valset, arg3 []types.MsgValsetConfirm) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EncodeValsetUpdate", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// EncodeValsetUpdate indicates an expected call of EncodeValsetUpdate.
func (mr *MockContractMockRecorder) EncodeValsetUpdate(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncodeValsetUpdate", reflect.TypeOf((*MockContract)(nil).EncodeValsetUpdate), arg0, arg1, arg2, arg3)
}
// EstimateGas mocks base method.
func (m *MockContract) EstimateGas(arg0 context.Context, arg1 common.Address, arg2 []byte) (uint64, *big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EstimateGas", arg0, arg1, arg2)
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(*big.Int)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// EstimateGas indicates an expected call of EstimateGas.
func (mr *MockContractMockRecorder) EstimateGas(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimateGas", reflect.TypeOf((*MockContract)(nil).EstimateGas), arg0, arg1, arg2)
}
// FromAddress mocks base method.
func (m *MockContract) FromAddress() common.Address {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FromAddress")
ret0, _ := ret[0].(common.Address)
return ret0
}
// FromAddress indicates an expected call of FromAddress.
func (mr *MockContractMockRecorder) FromAddress() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FromAddress", reflect.TypeOf((*MockContract)(nil).FromAddress))
}
// GetERC20Decimals mocks base method.
func (m *MockContract) GetERC20Decimals(arg0 context.Context, arg1, arg2 common.Address) (byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetERC20Decimals", arg0, arg1, arg2)
ret0, _ := ret[0].(byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetERC20Decimals indicates an expected call of GetERC20Decimals.
func (mr *MockContractMockRecorder) GetERC20Decimals(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetERC20Decimals", reflect.TypeOf((*MockContract)(nil).GetERC20Decimals), arg0, arg1, arg2)
}
// GetERC20Symbol mocks base method.
func (m *MockContract) GetERC20Symbol(arg0 context.Context, arg1, arg2 common.Address) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetERC20Symbol", arg0, arg1, arg2)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetERC20Symbol indicates an expected call of GetERC20Symbol.
func (mr *MockContractMockRecorder) GetERC20Symbol(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetERC20Symbol", reflect.TypeOf((*MockContract)(nil).GetERC20Symbol), arg0, arg1, arg2)
}
// GetGravityID mocks base method.
func (m *MockContract) GetGravityID(arg0 context.Context, arg1 common.Address) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetGravityID", arg0, arg1)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetGravityID indicates an expected call of GetGravityID.
func (mr *MockContractMockRecorder) GetGravityID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGravityID", reflect.TypeOf((*MockContract)(nil).GetGravityID), arg0, arg1)
}
// GetPendingTxInputList mocks base method.
func (m *MockContract) GetPendingTxInputList() *gravity.PendingTxInputList {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPendingTxInputList")
ret0, _ := ret[0].(*gravity.PendingTxInputList)
return ret0
}
// GetPendingTxInputList indicates an expected call of GetPendingTxInputList.
func (mr *MockContractMockRecorder) GetPendingTxInputList() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPendingTxInputList", reflect.TypeOf((*MockContract)(nil).GetPendingTxInputList))
}
// GetTxBatchNonce mocks base method.
func (m *MockContract) GetTxBatchNonce(arg0 context.Context, arg1, arg2 common.Address) (*big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetTxBatchNonce", arg0, arg1, arg2)
ret0, _ := ret[0].(*big.Int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetTxBatchNonce indicates an expected call of GetTxBatchNonce.
func (mr *MockContractMockRecorder) GetTxBatchNonce(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTxBatchNonce", reflect.TypeOf((*MockContract)(nil).GetTxBatchNonce), arg0, arg1, arg2)
}
// GetValsetNonce mocks base method.
func (m *MockContract) GetValsetNonce(arg0 context.Context, arg1 common.Address) (*big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetValsetNonce", arg0, arg1)
ret0, _ := ret[0].(*big.Int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValsetNonce indicates an expected call of GetValsetNonce.
func (mr *MockContractMockRecorder) GetValsetNonce(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValsetNonce", reflect.TypeOf((*MockContract)(nil).GetValsetNonce), arg0, arg1)
}
// IsPendingTxInput mocks base method.
func (m *MockContract) IsPendingTxInput(arg0 []byte, arg1 time.Duration) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsPendingTxInput", arg0, arg1)
ret0, _ := ret[0].(bool)
return ret0
}
// IsPendingTxInput indicates an expected call of IsPendingTxInput.
func (mr *MockContractMockRecorder) IsPendingTxInput(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPendingTxInput", reflect.TypeOf((*MockContract)(nil).IsPendingTxInput), arg0, arg1)
}
// Provider mocks base method.
func (m *MockContract) Provider() provider.EVMProvider {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Provider")
ret0, _ := ret[0].(provider.EVMProvider)
return ret0
}
// Provider indicates an expected call of Provider.
func (mr *MockContractMockRecorder) Provider() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Provider", reflect.TypeOf((*MockContract)(nil).Provider))
}
// SendTx mocks base method.
func (m *MockContract) SendTx(arg0 context.Context, arg1 common.Address, arg2 []byte, arg3 uint64, arg4 *big.Int) (common.Hash, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendTx", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(common.Hash)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SendTx indicates an expected call of SendTx.
func (mr *MockContractMockRecorder) SendTx(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTx", reflect.TypeOf((*MockContract)(nil).SendTx), arg0, arg1, arg2, arg3, arg4)
}
// SubscribeToPendingTxs mocks base method.
func (m *MockContract) SubscribeToPendingTxs(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SubscribeToPendingTxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SubscribeToPendingTxs indicates an expected call of SubscribeToPendingTxs.
func (mr *MockContractMockRecorder) SubscribeToPendingTxs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeToPendingTxs", reflect.TypeOf((*MockContract)(nil).SubscribeToPendingTxs), arg0, arg1)
}