-
Notifications
You must be signed in to change notification settings - Fork 178
/
sdk_client_wrapper.go
221 lines (187 loc) · 5.97 KB
/
sdk_client_wrapper.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
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mock
import (
context "context"
cadence "github.com/onflow/cadence"
flow "github.com/onflow/flow-go-sdk"
grpc "google.golang.org/grpc"
mock "github.com/stretchr/testify/mock"
)
// SDKClientWrapper is an autogenerated mock type for the SDKClientWrapper type
type SDKClientWrapper struct {
mock.Mock
}
// ExecuteScriptAtBlockID provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4
func (_m *SDKClientWrapper) ExecuteScriptAtBlockID(_a0 context.Context, _a1 flow.Identifier, _a2 []byte, _a3 []cadence.Value, _a4 ...grpc.CallOption) (cadence.Value, error) {
_va := make([]interface{}, len(_a4))
for _i := range _a4 {
_va[_i] = _a4[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1, _a2, _a3)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 cadence.Value
if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, []byte, []cadence.Value, ...grpc.CallOption) cadence.Value); ok {
r0 = rf(_a0, _a1, _a2, _a3, _a4...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(cadence.Value)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, []byte, []cadence.Value, ...grpc.CallOption) error); ok {
r1 = rf(_a0, _a1, _a2, _a3, _a4...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExecuteScriptAtLatestBlock provides a mock function with given fields: _a0, _a1, _a2, _a3
func (_m *SDKClientWrapper) ExecuteScriptAtLatestBlock(_a0 context.Context, _a1 []byte, _a2 []cadence.Value, _a3 ...grpc.CallOption) (cadence.Value, error) {
_va := make([]interface{}, len(_a3))
for _i := range _a3 {
_va[_i] = _a3[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1, _a2)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 cadence.Value
if rf, ok := ret.Get(0).(func(context.Context, []byte, []cadence.Value, ...grpc.CallOption) cadence.Value); ok {
r0 = rf(_a0, _a1, _a2, _a3...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(cadence.Value)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, []byte, []cadence.Value, ...grpc.CallOption) error); ok {
r1 = rf(_a0, _a1, _a2, _a3...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAccount provides a mock function with given fields: _a0, _a1, _a2
func (_m *SDKClientWrapper) GetAccount(_a0 context.Context, _a1 flow.Address, _a2 ...grpc.CallOption) (*flow.Account, error) {
_va := make([]interface{}, len(_a2))
for _i := range _a2 {
_va[_i] = _a2[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *flow.Account
if rf, ok := ret.Get(0).(func(context.Context, flow.Address, ...grpc.CallOption) *flow.Account); ok {
r0 = rf(_a0, _a1, _a2...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*flow.Account)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, flow.Address, ...grpc.CallOption) error); ok {
r1 = rf(_a0, _a1, _a2...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetAccountAtLatestBlock provides a mock function with given fields: _a0, _a1, _a2
func (_m *SDKClientWrapper) GetAccountAtLatestBlock(_a0 context.Context, _a1 flow.Address, _a2 ...grpc.CallOption) (*flow.Account, error) {
_va := make([]interface{}, len(_a2))
for _i := range _a2 {
_va[_i] = _a2[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *flow.Account
if rf, ok := ret.Get(0).(func(context.Context, flow.Address, ...grpc.CallOption) *flow.Account); ok {
r0 = rf(_a0, _a1, _a2...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*flow.Account)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, flow.Address, ...grpc.CallOption) error); ok {
r1 = rf(_a0, _a1, _a2...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetLatestBlock provides a mock function with given fields: _a0, _a1, _a2
func (_m *SDKClientWrapper) GetLatestBlock(_a0 context.Context, _a1 bool, _a2 ...grpc.CallOption) (*flow.Block, error) {
_va := make([]interface{}, len(_a2))
for _i := range _a2 {
_va[_i] = _a2[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *flow.Block
if rf, ok := ret.Get(0).(func(context.Context, bool, ...grpc.CallOption) *flow.Block); ok {
r0 = rf(_a0, _a1, _a2...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*flow.Block)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, bool, ...grpc.CallOption) error); ok {
r1 = rf(_a0, _a1, _a2...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetTransactionResult provides a mock function with given fields: _a0, _a1, _a2
func (_m *SDKClientWrapper) GetTransactionResult(_a0 context.Context, _a1 flow.Identifier, _a2 ...grpc.CallOption) (*flow.TransactionResult, error) {
_va := make([]interface{}, len(_a2))
for _i := range _a2 {
_va[_i] = _a2[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 *flow.TransactionResult
if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, ...grpc.CallOption) *flow.TransactionResult); ok {
r0 = rf(_a0, _a1, _a2...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*flow.TransactionResult)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, ...grpc.CallOption) error); ok {
r1 = rf(_a0, _a1, _a2...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SendTransaction provides a mock function with given fields: _a0, _a1, _a2
func (_m *SDKClientWrapper) SendTransaction(_a0 context.Context, _a1 flow.Transaction, _a2 ...grpc.CallOption) error {
_va := make([]interface{}, len(_a2))
for _i := range _a2 {
_va[_i] = _a2[_i]
}
var _ca []interface{}
_ca = append(_ca, _a0, _a1)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, flow.Transaction, ...grpc.CallOption) error); ok {
r0 = rf(_a0, _a1, _a2...)
} else {
r0 = ret.Error(0)
}
return r0
}