/
flux_aggregator.go
161 lines (129 loc) · 3.8 KB
/
flux_aggregator.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
// Code generated by mockery v2.3.0. DO NOT EDIT.
package mocks
import (
abi "github.com/ethereum/go-ethereum/accounts/abi"
common "github.com/ethereum/go-ethereum/common"
contracts "github.com/vordev/VOR/core/services/eth/contracts"
eth "github.com/vordev/VOR/core/services/eth"
mock "github.com/stretchr/testify/mock"
types "github.com/ethereum/go-ethereum/core/types"
)
// FluxAggregator is an autogenerated mock type for the FluxAggregator type
type FluxAggregator struct {
mock.Mock
}
// ABI provides a mock function with given fields:
func (_m *FluxAggregator) ABI() *abi.ABI {
ret := _m.Called()
var r0 *abi.ABI
if rf, ok := ret.Get(0).(func() *abi.ABI); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abi.ABI)
}
}
return r0
}
// Call provides a mock function with given fields: result, methodName, args
func (_m *FluxAggregator) Call(result interface{}, methodName string, args ...interface{}) error {
var _ca []interface{}
_ca = append(_ca, result, methodName)
_ca = append(_ca, args...)
ret := _m.Called(_ca...)
var r0 error
if rf, ok := ret.Get(0).(func(interface{}, string, ...interface{}) error); ok {
r0 = rf(result, methodName, args...)
} else {
r0 = ret.Error(0)
}
return r0
}
// EncodeMessageCall provides a mock function with given fields: method, args
func (_m *FluxAggregator) EncodeMessageCall(method string, args ...interface{}) ([]byte, error) {
var _ca []interface{}
_ca = append(_ca, method)
_ca = append(_ca, args...)
ret := _m.Called(_ca...)
var r0 []byte
if rf, ok := ret.Get(0).(func(string, ...interface{}) []byte); ok {
r0 = rf(method, args...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, ...interface{}) error); ok {
r1 = rf(method, args...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetMethodID provides a mock function with given fields: method
func (_m *FluxAggregator) GetMethodID(method string) ([]byte, error) {
ret := _m.Called(method)
var r0 []byte
if rf, ok := ret.Get(0).(func(string) []byte); ok {
r0 = rf(method)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(method)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RoundState provides a mock function with given fields: oracle, roundID
func (_m *FluxAggregator) RoundState(oracle common.Address, roundID uint32) (contracts.FluxAggregatorRoundState, error) {
ret := _m.Called(oracle, roundID)
var r0 contracts.FluxAggregatorRoundState
if rf, ok := ret.Get(0).(func(common.Address, uint32) contracts.FluxAggregatorRoundState); ok {
r0 = rf(oracle, roundID)
} else {
r0 = ret.Get(0).(contracts.FluxAggregatorRoundState)
}
var r1 error
if rf, ok := ret.Get(1).(func(common.Address, uint32) error); ok {
r1 = rf(oracle, roundID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SubscribeToLogs provides a mock function with given fields: listener
func (_m *FluxAggregator) SubscribeToLogs(listener eth.LogListener) (bool, eth.UnsubscribeFunc) {
ret := _m.Called(listener)
var r0 bool
if rf, ok := ret.Get(0).(func(eth.LogListener) bool); ok {
r0 = rf(listener)
} else {
r0 = ret.Get(0).(bool)
}
var r1 eth.UnsubscribeFunc
if rf, ok := ret.Get(1).(func(eth.LogListener) eth.UnsubscribeFunc); ok {
r1 = rf(listener)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(eth.UnsubscribeFunc)
}
}
return r0, r1
}
// UnpackLog provides a mock function with given fields: out, event, log
func (_m *FluxAggregator) UnpackLog(out interface{}, event string, log types.Log) error {
ret := _m.Called(out, event, log)
var r0 error
if rf, ok := ret.Get(0).(func(interface{}, string, types.Log) error); ok {
r0 = rf(out, event, log)
} else {
r0 = ret.Error(0)
}
return r0
}