forked from smartcontractkit/chainlink
/
orm.go
100 lines (79 loc) · 3.06 KB
/
orm.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
// Code generated by mockery v2.8.0. DO NOT EDIT.
package mocks
import (
common "github.com/ethereum/go-ethereum/common"
fluxmonitorv2 "github.com/DCMMC/chainlink/core/services/fluxmonitorv2"
gorm "gorm.io/gorm"
mock "github.com/stretchr/testify/mock"
)
// ORM is an autogenerated mock type for the ORM type
type ORM struct {
mock.Mock
}
// CreateEthTransaction provides a mock function with given fields: db, fromAddress, toAddress, payload, gasLimit
func (_m *ORM) CreateEthTransaction(db *gorm.DB, fromAddress common.Address, toAddress common.Address, payload []byte, gasLimit uint64) error {
ret := _m.Called(db, fromAddress, toAddress, payload, gasLimit)
var r0 error
if rf, ok := ret.Get(0).(func(*gorm.DB, common.Address, common.Address, []byte, uint64) error); ok {
r0 = rf(db, fromAddress, toAddress, payload, gasLimit)
} else {
r0 = ret.Error(0)
}
return r0
}
// DeleteFluxMonitorRoundsBackThrough provides a mock function with given fields: aggregator, roundID
func (_m *ORM) DeleteFluxMonitorRoundsBackThrough(aggregator common.Address, roundID uint32) error {
ret := _m.Called(aggregator, roundID)
var r0 error
if rf, ok := ret.Get(0).(func(common.Address, uint32) error); ok {
r0 = rf(aggregator, roundID)
} else {
r0 = ret.Error(0)
}
return r0
}
// FindOrCreateFluxMonitorRoundStats provides a mock function with given fields: aggregator, roundID, newRoundLogs
func (_m *ORM) FindOrCreateFluxMonitorRoundStats(aggregator common.Address, roundID uint32, newRoundLogs uint) (fluxmonitorv2.FluxMonitorRoundStatsV2, error) {
ret := _m.Called(aggregator, roundID, newRoundLogs)
var r0 fluxmonitorv2.FluxMonitorRoundStatsV2
if rf, ok := ret.Get(0).(func(common.Address, uint32, uint) fluxmonitorv2.FluxMonitorRoundStatsV2); ok {
r0 = rf(aggregator, roundID, newRoundLogs)
} else {
r0 = ret.Get(0).(fluxmonitorv2.FluxMonitorRoundStatsV2)
}
var r1 error
if rf, ok := ret.Get(1).(func(common.Address, uint32, uint) error); ok {
r1 = rf(aggregator, roundID, newRoundLogs)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MostRecentFluxMonitorRoundID provides a mock function with given fields: aggregator
func (_m *ORM) MostRecentFluxMonitorRoundID(aggregator common.Address) (uint32, error) {
ret := _m.Called(aggregator)
var r0 uint32
if rf, ok := ret.Get(0).(func(common.Address) uint32); ok {
r0 = rf(aggregator)
} else {
r0 = ret.Get(0).(uint32)
}
var r1 error
if rf, ok := ret.Get(1).(func(common.Address) error); ok {
r1 = rf(aggregator)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// UpdateFluxMonitorRoundStats provides a mock function with given fields: db, aggregator, roundID, runID, newRoundLogsAddition
func (_m *ORM) UpdateFluxMonitorRoundStats(db *gorm.DB, aggregator common.Address, roundID uint32, runID int64, newRoundLogsAddition uint) error {
ret := _m.Called(db, aggregator, roundID, runID, newRoundLogsAddition)
var r0 error
if rf, ok := ret.Get(0).(func(*gorm.DB, common.Address, uint32, int64, uint) error); ok {
r0 = rf(db, aggregator, roundID, runID, newRoundLogsAddition)
} else {
r0 = ret.Error(0)
}
return r0
}