-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
flags.go
113 lines (89 loc) · 2.43 KB
/
flags.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
// Code generated by mockery v2.28.1. DO NOT EDIT.
package mocks
import (
common "github.com/ethereum/go-ethereum/common"
generated "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated"
mock "github.com/stretchr/testify/mock"
types "github.com/ethereum/go-ethereum/core/types"
)
// Flags is an autogenerated mock type for the Flags type
type Flags struct {
mock.Mock
}
// Address provides a mock function with given fields:
func (_m *Flags) Address() common.Address {
ret := _m.Called()
var r0 common.Address
if rf, ok := ret.Get(0).(func() common.Address); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(common.Address)
}
}
return r0
}
// ContractExists provides a mock function with given fields:
func (_m *Flags) ContractExists() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// IsLowered provides a mock function with given fields: contractAddr
func (_m *Flags) IsLowered(contractAddr common.Address) (bool, error) {
ret := _m.Called(contractAddr)
var r0 bool
var r1 error
if rf, ok := ret.Get(0).(func(common.Address) (bool, error)); ok {
return rf(contractAddr)
}
if rf, ok := ret.Get(0).(func(common.Address) bool); ok {
r0 = rf(contractAddr)
} else {
r0 = ret.Get(0).(bool)
}
if rf, ok := ret.Get(1).(func(common.Address) error); ok {
r1 = rf(contractAddr)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ParseLog provides a mock function with given fields: log
func (_m *Flags) ParseLog(log types.Log) (generated.AbigenLog, error) {
ret := _m.Called(log)
var r0 generated.AbigenLog
var r1 error
if rf, ok := ret.Get(0).(func(types.Log) (generated.AbigenLog, error)); ok {
return rf(log)
}
if rf, ok := ret.Get(0).(func(types.Log) generated.AbigenLog); ok {
r0 = rf(log)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(generated.AbigenLog)
}
}
if rf, ok := ret.Get(1).(func(types.Log) error); ok {
r1 = rf(log)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewFlags interface {
mock.TestingT
Cleanup(func())
}
// NewFlags creates a new instance of Flags. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewFlags(t mockConstructorTestingTNewFlags) *Flags {
mock := &Flags{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}