-
Notifications
You must be signed in to change notification settings - Fork 892
/
api.go
236 lines (203 loc) · 9.54 KB
/
api.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/celestiaorg/celestia-node/nodebuilder/state (interfaces: Module)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
math "cosmossdk.io/math"
blob "github.com/celestiaorg/celestia-node/blob"
state "github.com/celestiaorg/celestia-node/state"
types "github.com/cosmos/cosmos-sdk/types"
types0 "github.com/cosmos/cosmos-sdk/x/staking/types"
gomock "github.com/golang/mock/gomock"
types1 "github.com/tendermint/tendermint/types"
)
// MockModule is a mock of Module interface.
type MockModule struct {
ctrl *gomock.Controller
recorder *MockModuleMockRecorder
}
// MockModuleMockRecorder is the mock recorder for MockModule.
type MockModuleMockRecorder struct {
mock *MockModule
}
// NewMockModule creates a new mock instance.
func NewMockModule(ctrl *gomock.Controller) *MockModule {
mock := &MockModule{ctrl: ctrl}
mock.recorder = &MockModuleMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockModule) EXPECT() *MockModuleMockRecorder {
return m.recorder
}
// AccountAddress mocks base method.
func (m *MockModule) AccountAddress(arg0 context.Context) (state.Address, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AccountAddress", arg0)
ret0, _ := ret[0].(state.Address)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AccountAddress indicates an expected call of AccountAddress.
func (mr *MockModuleMockRecorder) AccountAddress(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountAddress", reflect.TypeOf((*MockModule)(nil).AccountAddress), arg0)
}
// Balance mocks base method.
func (m *MockModule) Balance(arg0 context.Context) (*types.Coin, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Balance", arg0)
ret0, _ := ret[0].(*types.Coin)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Balance indicates an expected call of Balance.
func (mr *MockModuleMockRecorder) Balance(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Balance", reflect.TypeOf((*MockModule)(nil).Balance), arg0)
}
// BalanceForAddress mocks base method.
func (m *MockModule) BalanceForAddress(arg0 context.Context, arg1 state.Address) (*types.Coin, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BalanceForAddress", arg0, arg1)
ret0, _ := ret[0].(*types.Coin)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// BalanceForAddress indicates an expected call of BalanceForAddress.
func (mr *MockModuleMockRecorder) BalanceForAddress(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BalanceForAddress", reflect.TypeOf((*MockModule)(nil).BalanceForAddress), arg0, arg1)
}
// BeginRedelegate mocks base method.
func (m *MockModule) BeginRedelegate(arg0 context.Context, arg1, arg2 types.ValAddress, arg3, arg4 math.Int, arg5 uint64) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BeginRedelegate", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// BeginRedelegate indicates an expected call of BeginRedelegate.
func (mr *MockModuleMockRecorder) BeginRedelegate(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginRedelegate", reflect.TypeOf((*MockModule)(nil).BeginRedelegate), arg0, arg1, arg2, arg3, arg4, arg5)
}
// CancelUnbondingDelegation mocks base method.
func (m *MockModule) CancelUnbondingDelegation(arg0 context.Context, arg1 types.ValAddress, arg2, arg3, arg4 math.Int, arg5 uint64) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CancelUnbondingDelegation", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CancelUnbondingDelegation indicates an expected call of CancelUnbondingDelegation.
func (mr *MockModuleMockRecorder) CancelUnbondingDelegation(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelUnbondingDelegation", reflect.TypeOf((*MockModule)(nil).CancelUnbondingDelegation), arg0, arg1, arg2, arg3, arg4, arg5)
}
// Delegate mocks base method.
func (m *MockModule) Delegate(arg0 context.Context, arg1 types.ValAddress, arg2, arg3 math.Int, arg4 uint64) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delegate", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Delegate indicates an expected call of Delegate.
func (mr *MockModuleMockRecorder) Delegate(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegate", reflect.TypeOf((*MockModule)(nil).Delegate), arg0, arg1, arg2, arg3, arg4)
}
// QueryDelegation mocks base method.
func (m *MockModule) QueryDelegation(arg0 context.Context, arg1 types.ValAddress) (*types0.QueryDelegationResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryDelegation", arg0, arg1)
ret0, _ := ret[0].(*types0.QueryDelegationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryDelegation indicates an expected call of QueryDelegation.
func (mr *MockModuleMockRecorder) QueryDelegation(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryDelegation", reflect.TypeOf((*MockModule)(nil).QueryDelegation), arg0, arg1)
}
// QueryRedelegations mocks base method.
func (m *MockModule) QueryRedelegations(arg0 context.Context, arg1, arg2 types.ValAddress) (*types0.QueryRedelegationsResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryRedelegations", arg0, arg1, arg2)
ret0, _ := ret[0].(*types0.QueryRedelegationsResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryRedelegations indicates an expected call of QueryRedelegations.
func (mr *MockModuleMockRecorder) QueryRedelegations(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryRedelegations", reflect.TypeOf((*MockModule)(nil).QueryRedelegations), arg0, arg1, arg2)
}
// QueryUnbonding mocks base method.
func (m *MockModule) QueryUnbonding(arg0 context.Context, arg1 types.ValAddress) (*types0.QueryUnbondingDelegationResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryUnbonding", arg0, arg1)
ret0, _ := ret[0].(*types0.QueryUnbondingDelegationResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// QueryUnbonding indicates an expected call of QueryUnbonding.
func (mr *MockModuleMockRecorder) QueryUnbonding(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryUnbonding", reflect.TypeOf((*MockModule)(nil).QueryUnbonding), arg0, arg1)
}
// SubmitPayForBlob mocks base method.
func (m *MockModule) SubmitPayForBlob(arg0 context.Context, arg1 math.Int, arg2 uint64, arg3 []*blob.Blob) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SubmitPayForBlob", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitPayForBlob indicates an expected call of SubmitPayForBlob.
func (mr *MockModuleMockRecorder) SubmitPayForBlob(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitPayForBlob", reflect.TypeOf((*MockModule)(nil).SubmitPayForBlob), arg0, arg1, arg2, arg3)
}
// SubmitTx mocks base method.
func (m *MockModule) SubmitTx(arg0 context.Context, arg1 types1.Tx) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SubmitTx", arg0, arg1)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitTx indicates an expected call of SubmitTx.
func (mr *MockModuleMockRecorder) SubmitTx(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitTx", reflect.TypeOf((*MockModule)(nil).SubmitTx), arg0, arg1)
}
// Transfer mocks base method.
func (m *MockModule) Transfer(arg0 context.Context, arg1 types.AccAddress, arg2, arg3 math.Int, arg4 uint64) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Transfer", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Transfer indicates an expected call of Transfer.
func (mr *MockModuleMockRecorder) Transfer(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transfer", reflect.TypeOf((*MockModule)(nil).Transfer), arg0, arg1, arg2, arg3, arg4)
}
// Undelegate mocks base method.
func (m *MockModule) Undelegate(arg0 context.Context, arg1 types.ValAddress, arg2, arg3 math.Int, arg4 uint64) (*types.TxResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Undelegate", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(*types.TxResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Undelegate indicates an expected call of Undelegate.
func (mr *MockModuleMockRecorder) Undelegate(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Undelegate", reflect.TypeOf((*MockModule)(nil).Undelegate), arg0, arg1, arg2, arg3, arg4)
}