-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
121 lines (105 loc) · 2.8 KB
/
config.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
package config
import (
"math/big"
"time"
gethcommon "github.com/ethereum/go-ethereum/common"
commonassets "github.com/O1MaGnUmO1/chainlink-common/pkg/assets"
commonconfig "github.com/O1MaGnUmO1/erinaceus-vrf/common/config"
"github.com/O1MaGnUmO1/erinaceus-vrf/core/chains/evm/assets"
"github.com/O1MaGnUmO1/erinaceus-vrf/core/config"
)
type EVM interface {
HeadTracker() HeadTracker
BalanceMonitor() BalanceMonitor
Transactions() Transactions
GasEstimator() GasEstimator
NodePool() NodePool
AutoCreateKey() bool
BlockBackfillDepth() uint64
BlockBackfillSkip() bool
BlockEmissionIdleWarningThreshold() time.Duration
ChainID() *big.Int
ChainType() commonconfig.ChainType
FinalityDepth() uint32
FinalityTagEnabled() bool
FlagsContractAddress() string
LinkContractAddress() string
LogBackfillBatchSize() uint32
LogKeepBlocksDepth() uint32
LogPollInterval() time.Duration
MinContractPayment() *commonassets.Link
MinIncomingConfirmations() uint32
NonceAutoSync() bool
OperatorFactoryAddress() string
RPCDefaultBatchSize() uint32
NodeNoNewHeadsThreshold() time.Duration
IsEnabled() bool
TOMLString() (string, error)
}
type HeadTracker interface {
HistoryDepth() uint32
MaxBufferSize() uint32
SamplingInterval() time.Duration
}
type BalanceMonitor interface {
Enabled() bool
}
type Transactions interface {
ForwardersEnabled() bool
ReaperInterval() time.Duration
ResendAfterThreshold() time.Duration
ReaperThreshold() time.Duration
MaxInFlight() uint32
MaxQueued() uint64
}
//go:generate mockery --quiet --name GasEstimator --output ./mocks/ --case=underscore
type GasEstimator interface {
BlockHistory() BlockHistory
LimitJobType() LimitJobType
EIP1559DynamicFees() bool
BumpPercent() uint16
BumpThreshold() uint64
BumpTxDepth() uint32
BumpMin() *assets.Wei
FeeCapDefault() *assets.Wei
LimitDefault() uint32
LimitMax() uint32
LimitMultiplier() float32
LimitTransfer() uint32
PriceDefault() *assets.Wei
TipCapDefault() *assets.Wei
TipCapMin() *assets.Wei
PriceMax() *assets.Wei
PriceMin() *assets.Wei
Mode() string
PriceMaxKey(gethcommon.Address) *assets.Wei
}
type LimitJobType interface {
DR() *uint32
FM() *uint32
VRF() *uint32
}
type BlockHistory interface {
BatchSize() uint32
BlockHistorySize() uint16
BlockDelay() uint16
CheckInclusionBlocks() uint16
CheckInclusionPercentile() uint16
EIP1559FeeCapBufferBlocks() uint16
TransactionPercentile() uint16
}
type NodePool interface {
PollFailureThreshold() uint32
PollInterval() time.Duration
SelectionMode() string
SyncThreshold() uint32
LeaseDuration() time.Duration
}
// TODO BCF-2509 does the chainscopedconfig really need the entire app config?
//
//go:generate mockery --quiet --name ChainScopedConfig --output ./mocks/ --case=underscore
type ChainScopedConfig interface {
config.AppConfig
Validate() error
EVM() EVM
}