/
relayer_chain_interoperators.go
62 lines (46 loc) · 1.99 KB
/
relayer_chain_interoperators.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
package mocks
import (
"context"
"slices"
services2 "github.com/smartcontractkit/chainlink/v2/core/services"
"github.com/smartcontractkit/chainlink/v2/core/services/chainlink"
"github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm"
"github.com/smartcontractkit/chainlink-common/pkg/loop"
"github.com/smartcontractkit/chainlink/v2/core/services/relay"
"github.com/smartcontractkit/chainlink-common/pkg/types"
)
// FakeRelayerChainInteroperators is a fake chainlink.RelayerChainInteroperators.
// This exists because mockery generation doesn't understand how to produce an alias instead of the underlying type (which is not exported in this case).
type FakeRelayerChainInteroperators struct {
Relayers []loop.Relayer
EVMChains legacyevm.LegacyChainContainer
Nodes []types.NodeStatus
NodesErr error
}
func (f *FakeRelayerChainInteroperators) LegacyEVMChains() legacyevm.LegacyChainContainer {
return f.EVMChains
}
func (f *FakeRelayerChainInteroperators) NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...relay.ID) (nodes []types.NodeStatus, count int, err error) {
return slices.Clone(f.Nodes), len(f.Nodes), f.NodesErr
}
func (f *FakeRelayerChainInteroperators) Services() []services2.ServiceCtx {
panic("unimplemented")
}
func (f *FakeRelayerChainInteroperators) List(filter chainlink.FilterFn) chainlink.RelayerChainInteroperators {
panic("unimplemented")
}
func (f *FakeRelayerChainInteroperators) Get(id relay.ID) (loop.Relayer, error) {
panic("unimplemented")
}
func (f *FakeRelayerChainInteroperators) Slice() []loop.Relayer {
return f.Relayers
}
func (f *FakeRelayerChainInteroperators) LegacyCosmosChains() chainlink.LegacyCosmosContainer {
panic("unimplemented")
}
func (f *FakeRelayerChainInteroperators) ChainStatus(ctx context.Context, id relay.ID) (types.ChainStatus, error) {
panic("unimplemented")
}
func (f *FakeRelayerChainInteroperators) ChainStatuses(ctx context.Context, offset, limit int) ([]types.ChainStatus, int, error) {
panic("unimplemented")
}