Skip to content

Commit

Permalink
add context
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Jan 14, 2024
1 parent 31565b6 commit 9384db1
Show file tree
Hide file tree
Showing 60 changed files with 374 additions and 729 deletions.
9 changes: 5 additions & 4 deletions core/chains/evm/log/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func newBroadcasterHelperWithEthClient(t *testing.T, ethClient evmclient.Client,
lb := log.NewTestBroadcaster(orm, ethClient, config.EVM(), lggr, highestSeenHead, mailMon)
kst := cltest.NewKeyStore(t, db, globalConfig.Database())

cc := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{
chainsAndConfig := evmtest.NewLegacyChainsAndConfig(t, evmtest.TestChainOpts{
Client: ethClient,
GeneralConfig: globalConfig,
DB: db,
Expand All @@ -107,10 +107,11 @@ func newBroadcasterHelperWithEthClient(t *testing.T, ethClient evmclient.Client,
})

m := make(map[string]legacyevm.Chain)
for _, r := range cc.Slice() {
m[r.Chain().ID().String()] = r.Chain()
for _, r := range chainsAndConfig.Slice() {
m[r.ID().String()] = r
}
legacyChains := legacyevm.NewLegacyChains(m, cc.AppConfig().EVMConfigs())

legacyChains := chainsAndConfig.NewLegacyChains()
pipelineHelper := cltest.NewJobPipelineV2(t, config.WebServer(), config.JobPipeline(), config.Database(), legacyChains, db, kst, nil, nil)

return &broadcasterHelper{
Expand Down
21 changes: 3 additions & 18 deletions core/chains/legacyevm/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,27 +139,12 @@ type AppConfig interface {
toml.HasEVMConfigs
}

type ChainRelayExtenderConfig struct {
type ChainRelayOpts struct {
Logger logger.Logger
KeyStore keystore.Eth
ChainOpts
}

func (c ChainRelayExtenderConfig) Validate() error {
err := c.ChainOpts.Validate()
if c.Logger == nil {
err = errors.Join(err, errors.New("nil Logger"))
}
if c.KeyStore == nil {
err = errors.Join(err, errors.New("nil Keystore"))
}

if err != nil {
err = fmt.Errorf("invalid ChainRelayerExtenderConfig: %w", err)
}
return err
}

type ChainOpts struct {
AppConfig AppConfig

Expand Down Expand Up @@ -196,7 +181,7 @@ func (o ChainOpts) Validate() error {
return err
}

func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayExtenderConfig) (Chain, error) {
func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayOpts) (Chain, error) {
err := opts.Validate()
if err != nil {
return nil, err
Expand All @@ -211,7 +196,7 @@ func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayExt
return newChain(ctx, cfg, chain.Nodes, opts)
}

func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Node, opts ChainRelayExtenderConfig) (*chain, error) {
func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Node, opts ChainRelayOpts) (*chain, error) {
chainID, chainType := cfg.EVM().ChainID(), cfg.EVM().ChainType()
l := opts.Logger
var client evmclient.Client
Expand Down
2 changes: 1 addition & 1 deletion core/chains/legacyevm/evm_txm.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func newEvmTxm(
client evmclient.Client,
lggr logger.Logger,
logPoller logpoller.LogPoller,
opts ChainRelayExtenderConfig,
opts ChainRelayOpts,
) (txm txmgr.TxManager,
estimator gas.EvmFeeEstimator,
err error,
Expand Down
6 changes: 3 additions & 3 deletions core/cmd/shell_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"github.com/urfave/cli"
)

func genTestEVMRelayers(t *testing.T, opts legacyevm.ChainRelayExtenderConfig, ks evmrelayer.CSAETHKeystore) *chainlink.CoreRelayerChainInteroperators {
func genTestEVMRelayers(t *testing.T, opts legacyevm.ChainRelayOpts, ks evmrelayer.CSAETHKeystore) *chainlink.CoreRelayerChainInteroperators {
f := chainlink.RelayerFactory{
Logger: opts.Logger,
LoopRegistry: plugins.NewLoopRegistry(opts.Logger, opts.AppConfig.Tracing()),
Expand Down Expand Up @@ -85,7 +85,7 @@ func TestShell_RunNodeWithPasswords(t *testing.T) {

lggr := logger.TestLogger(t)

opts := legacyevm.ChainRelayExtenderConfig{
opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: keyStore.Eth(),
ChainOpts: legacyevm.ChainOpts{
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestShell_RunNodeWithAPICredentialsFile(t *testing.T) {
ethClient.On("BalanceAt", mock.Anything, mock.Anything, mock.Anything).Return(big.NewInt(10), nil).Maybe()

lggr := logger.TestLogger(t)
opts := legacyevm.ChainRelayExtenderConfig{
opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: keyStore.Eth(),
ChainOpts: legacyevm.ChainOpts{
Expand Down
7 changes: 3 additions & 4 deletions core/internal/features/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/services/webhook"
"github.com/smartcontractkit/chainlink/v2/core/static"
"github.com/smartcontractkit/chainlink/v2/core/store/models"
Expand Down Expand Up @@ -1262,7 +1261,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
kst := cltest.NewKeyStore(t, db, cfg.Database())
require.NoError(t, kst.Unlock(cltest.Password))

cc := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), Client: ethClient, GeneralConfig: cfg})
chainsAndConfig := evmtest.NewLegacyChainsAndConfig(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), Client: ethClient, GeneralConfig: cfg})

b41 := evmtypes.Block{
Number: 41,
Expand Down Expand Up @@ -1318,8 +1317,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
ethClient.On("HeadByHash", mock.Anything, h41.Hash).Return(&h41, nil).Maybe()
ethClient.On("HeadByHash", mock.Anything, h42.Hash).Return(&h42, nil).Maybe()

legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(cc)
for _, re := range cc.Slice() {
for _, re := range chainsAndConfig.Slice() {
servicetest.Run(t, re)
}
var newHeads evmtest.RawSub[*evmtypes.Head]
Expand All @@ -1329,6 +1327,7 @@ func TestIntegration_BlockHistoryEstimator(t *testing.T) {
t.Fatal("timed out waiting for app to subscribe")
}

legacyChains := chainsAndConfig.NewLegacyChains()
chain := evmtest.MustGetDefaultChain(t, legacyChains)
estimator := chain.GasEstimator()
gasPrice, gasLimit, err := estimator.GetFee(testutils.Context(t), nil, 500_000, maxGasPrice)
Expand Down
19 changes: 13 additions & 6 deletions core/internal/testutils/evmtest/evmtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,26 @@ type TestChainOpts struct {
GasEstimator gas.EvmFeeEstimator
}

// NewChainRelayExtenders returns a simple chain collection with one chain and
// NewLegacyChainsAndConfig returns a simple chain collection with one chain and
// allows to mock client/config on that chain
func NewChainRelayExtenders(t testing.TB, testopts TestChainOpts) *evmrelay.ChainRelayerExtenders {
opts := NewChainRelayExtOpts(t, testopts)
cc, err := evmrelay.NewChainRelayerExtenders(testutils.Context(t), opts)
func NewLegacyChainsAndConfig(t testing.TB, testopts TestChainOpts) *evmrelay.LegacyChainsAndConfig {
opts := NewChainOpts(t, testopts)
cc, err := evmrelay.NewLegacyChainsAndConfig(testutils.Context(t), opts)
require.NoError(t, err)
return cc
}

func NewChainRelayExtOpts(t testing.TB, testopts TestChainOpts) legacyevm.ChainRelayExtenderConfig {
func NewLegacyChains(t testing.TB, testopts TestChainOpts) *legacyevm.LegacyChains {
opts := NewChainOpts(t, testopts)
cc, err := evmrelay.NewLegacyChainsAndConfig(testutils.Context(t), opts)
require.NoError(t, err)
return cc.NewLegacyChains()
}

func NewChainOpts(t testing.TB, testopts TestChainOpts) legacyevm.ChainRelayOpts {
require.NotNil(t, testopts.KeyStore)
lggr := logger.TestLogger(t)
opts := legacyevm.ChainRelayExtenderConfig{
opts := legacyevm.ChainRelayOpts{
Logger: lggr,
KeyStore: testopts.KeyStore,
ChainOpts: legacyevm.ChainOpts{
Expand Down
18 changes: 12 additions & 6 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ go 1.21.3
// Make sure we're working with the latest chainlink libs
replace github.com/smartcontractkit/chainlink/v2 => ../../

replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240112230745-2fac9a2947d0

replace github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin => github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240112231155-782e854d3ca2

replace github.com/smartcontractkit/tdh2/go/tdh2 => github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240112231155-782e854d3ca2

require (
github.com/docker/docker v24.0.7+incompatible
github.com/docker/go-connections v0.4.0
Expand All @@ -18,9 +24,9 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/pelletier/go-toml/v2 v2.1.1
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-automation v1.0.1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240108182329-237f56daad6b
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240112232334-de053be2a416
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240113213851-efffc3787cc7
github.com/smartcontractkit/chainlink-vrf v0.0.0-20240112231546-45f885b4077e
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20231130143053-c5102a9c0fb7
github.com/spf13/cobra v1.6.1
Expand Down Expand Up @@ -242,11 +248,11 @@ require (
github.com/shirou/gopsutil/v3 v3.23.11 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231218175426-6e0427c661e5 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240113193536-8f6a12bf1f87 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20231127231053-2232d3a6766d // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231219140448-151a4725f312 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231219014050-0c4a7831293a // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240113214139-fc2300ce4580 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240113213933-2b680ac849b1 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/wsrpc v0.7.2 // indirect
Expand Down
36 changes: 18 additions & 18 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,12 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
github.com/jmank88/libocr v0.0.0-20240112230745-2fac9a2947d0 h1:ON2l755Emwb9RFUYhIhQZXkraFfRdFfGfAn7Ded6akQ=
github.com/jmank88/libocr v0.0.0-20240112230745-2fac9a2947d0/go.mod h1:WcuWFMskcGK0MYZuH5hEhGJOzdJRUFeNEM4PAKlejI4=
github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240112231155-782e854d3ca2 h1:Is1Mky3KrcbhK/Y2gs/nhR6fKeuVupD6urIVQLmP7sM=
github.com/jmank88/tdh2/go/ocr2/decryptionplugin v0.0.0-20240112231155-782e854d3ca2/go.mod h1:6i2tn96F0C4PHiilFtWGVmZnp9m98lSLj9zaxSz0jV8=
github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240112231155-782e854d3ca2 h1:un1qd1p4obk2bTRqA0+IN+4iM3PrNhkhbAdrN/Nmv20=
github.com/jmank88/tdh2/go/tdh2 v0.0.0-20240112231155-782e854d3ca2/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
Expand Down Expand Up @@ -1162,32 +1168,26 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo=
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M=
github.com/smartcontractkit/chainlink-automation v1.0.1 h1:vVjBFq2Zsz21kPy1Pb0wpjF9zrbJX+zjXphDeeR4XZk=
github.com/smartcontractkit/chainlink-automation v1.0.1/go.mod h1:INSchkV3ntyDdlZKGWA030MPDpp6pbeuiRkRKYFCm2k=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240108182329-237f56daad6b h1:PRuvHgPka1gIGPKASuJHvqUvYWhZO7z5B/kKapjkZaM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240108182329-237f56daad6b/go.mod h1:f+0ei9N4PlTJHu7pbGzEjTnBUr45syPdGFu5+31lS5Q=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231218175426-6e0427c661e5 h1:kBnmjv3fxU7krVIqZFvo1m4F6qBc4vPURQFX/mcChhI=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20231218175426-6e0427c661e5/go.mod h1:EoM7wQ81mov7wsUzG4zEnnr0EH0POEo/I0hRDg433TU=
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240112232334-de053be2a416 h1:0y1ahFgoCr8XDnVtt/ggnmVGorsEAGfSZthahjHjKJ8=
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240112232334-de053be2a416/go.mod h1:96/xMsCUq8jaRkv/ODnX14QaJU4kt4gy3MTfRADLLaM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240113213851-efffc3787cc7 h1:h+Z8qh53HaTqU5zV4XHAE1wTaVSfZfdyfYXPpz688zE=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240113213851-efffc3787cc7/go.mod h1:fzgN322Qq4jCFAx/nrTi+TYvUOp6SYhpPPhIKepuzac=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240113193536-8f6a12bf1f87 h1:3fEIxv38h/G59wIiB6NahZiDdwmhmG2VL7PA0hK3Bvo=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240113193536-8f6a12bf1f87/go.mod h1:zeL+MxaiSEjNdPkDsMI8zjb+l2ZTN6m8u5oklFRFZAQ=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 h1:xYqRgZO0nMSO8CBCMR0r3WA+LZ4kNL8a6bnbyk/oBtQ=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1/go.mod h1:GuPvyXryvbiUZIHmPeLBz4L+yJKeyGUjrDfd1KNne+o=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20231127231053-2232d3a6766d h1:w4MsbOtNk6nD/mcXLstHWk9hB6g7QLtcAfhPjhwvOaQ=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20231127231053-2232d3a6766d/go.mod h1:YPAfLNowdBwiKiYOwgwtbJHi8AJWbcxkbOY0ItAvkfc=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231219140448-151a4725f312 h1:ziqC+WW/2/UI6w3DShy7HGzJMWWLIYHT5ev2Qaa3h6I=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231219140448-151a4725f312/go.mod h1:vqnojBNdzHNI6asWezJlottUiVEXudMEGf2Mz5R+xps=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231219014050-0c4a7831293a h1:atCXqF8e5U2zfEaA87cKJs+K1MAbOVh3V05gEd60fR0=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231219014050-0c4a7831293a/go.mod h1:YWKpf+hO9XMlzIWQT8yGoky3aeFLzMUVsjbs80LD77M=
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=
github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240113214139-fc2300ce4580 h1:HvCOqpfrG+ODx7Fp+D2CnVEvGmuLiJ6UkR8LcXFMLek=
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240113214139-fc2300ce4580/go.mod h1:X1BXPBWuDCCMUm9pmKA+u4eiapxNmyY0x5uEKueNJFg=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240113213933-2b680ac849b1 h1:BztQ8QEmI1z5TGBWmx2Pi+RyNX4OpjU0qijt8IRm0is=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240113213933-2b680ac849b1/go.mod h1:/VXLub0xjd7BaKTBjXlGac1hprt7iBGlvtsLTzYxHWM=
github.com/smartcontractkit/chainlink-vrf v0.0.0-20240112231546-45f885b4077e h1:kmtH8NE/ujL9pwrceL7QPMIH1Nb7s5Rtcc2xgKbwQ24=
github.com/smartcontractkit/chainlink-vrf v0.0.0-20240112231546-45f885b4077e/go.mod h1:1WMis7p5HzhTMZgUBPYYsx48PkzND+GuOq2IDerRSMs=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0=
github.com/smartcontractkit/libocr v0.0.0-20231130143053-c5102a9c0fb7 h1:AA7vf29c6lFsZm+MtIEtXtg6VUOQV6waJo5MUuHfRjQ=
github.com/smartcontractkit/libocr v0.0.0-20231130143053-c5102a9c0fb7/go.mod h1:WcuWFMskcGK0MYZuH5hEhGJOzdJRUFeNEM4PAKlejI4=
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE=
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg=
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ=
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw=
github.com/smartcontractkit/wsrpc v0.7.2 h1:iBXzMeg7vc5YoezIQBq896y25BARw7OKbhrb6vPbtRQ=
github.com/smartcontractkit/wsrpc v0.7.2/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
Expand Down
4 changes: 1 addition & 3 deletions core/services/blockhashstore/bhs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey"
evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
"github.com/smartcontractkit/chainlink/v2/core/utils"
)

Expand All @@ -29,8 +28,7 @@ func TestStoreRotatesFromAddresses(t *testing.T) {
cfg := configtest.NewTestGeneralConfig(t)
kst := cltest.NewKeyStore(t, db, cfg.Database())
require.NoError(t, kst.Unlock(cltest.Password))
relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), GeneralConfig: cfg, Client: ethClient})
legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
legacyChains := evmtest.NewLegacyChains(t, evmtest.TestChainOpts{DB: db, KeyStore: kst.Eth(), GeneralConfig: cfg, Client: ethClient})
chain, err := legacyChains.Get(cltest.FixtureChainID.String())
require.NoError(t, err)
lggr := logger.TestLogger(t)
Expand Down
4 changes: 1 addition & 3 deletions core/services/blockhashstore/delegate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/job"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore"
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey"
evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm"
)

func TestDelegate_JobType(t *testing.T) {
Expand Down Expand Up @@ -61,7 +60,7 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) {
lp.On("RegisterFilter", mock.Anything).Return(nil)
lp.On("LatestBlock", mock.Anything, mock.Anything).Return(logpoller.LogPollerBlock{}, nil)

relayExtenders := evmtest.NewChainRelayExtenders(
legacyChains := evmtest.NewLegacyChains(
t,
evmtest.TestChainOpts{
DB: db,
Expand All @@ -71,7 +70,6 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) {
LogPoller: lp,
},
)
legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders)
return blockhashstore.NewDelegate(lggr, legacyChains, kst), &testData{
ethClient: ethClient,
ethKeyStore: kst,
Expand Down
Loading

0 comments on commit 9384db1

Please sign in to comment.