Skip to content

Commit

Permalink
add context
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Mar 10, 2024
1 parent 6cc958f commit 54a92d0
Show file tree
Hide file tree
Showing 16 changed files with 111 additions and 99 deletions.
9 changes: 6 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ module github.com/smartcontractkit/chainlink-solana

go 1.21

replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240310194736-d3f510b9f9e2

require (
github.com/davecgh/go-spew v1.1.1
github.com/gagliardetto/binary v0.7.1
github.com/gagliardetto/gofuzz v1.2.2
github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27
github.com/gagliardetto/treeout v0.1.4
github.com/google/uuid v1.3.1
github.com/hashicorp/go-plugin v1.5.2
github.com/hashicorp/go-plugin v1.6.0
github.com/pelletier/go-toml/v2 v2.1.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240310203442-c2f41d4f438f
github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1
github.com/stretchr/testify v1.8.4
github.com/test-go/testify v1.1.4
Expand Down Expand Up @@ -48,7 +50,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.15 // indirect
Expand All @@ -58,6 +60,7 @@ require (
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,16 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
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-20240310194736-d3f510b9f9e2 h1:WqwrEnVkaDWldq2ljN6ytKbQtdEmoO4gdoqspyZxXlo=
github.com/jmank88/libocr v0.0.0-20240310194736-d3f510b9f9e2/go.mod h1:kC0qmVPUaVkFqGiZMNhmRmjdphuUmeyLEdlWFOQzFWI=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
Expand Down Expand Up @@ -424,14 +426,12 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4 h1:Yk0RK9WV59ISOZZMsdtxZBAKaBfdgb05oXyca/qSqcw=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240213113935-001c2f4befd4/go.mod h1:pRlQrvcizMmuHAUV4N96oO2e3XbA99JCQELLc6ES160=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240310203442-c2f41d4f438f h1:1et8C/1Ze/w02VJs7zHpY4XIJ9DD4ihsQFmPyVQMjMc=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240310203442-c2f41d4f438f/go.mod h1:ftihcSXX2W0CPHEb0p70BRbZbIjgI0D25bkInYFgcEA=
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-20240112202000-6359502d2ff1 h1:3y9WsXkZ5lxFrmfH7DQHs/q308lylKId5l/3VC0QAdM=
github.com/smartcontractkit/libocr v0.0.0-20240112202000-6359502d2ff1/go.mod h1:kC0qmVPUaVkFqGiZMNhmRmjdphuUmeyLEdlWFOQzFWI=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/lib/pq v1.10.9
github.com/onsi/gomega v1.30.0
github.com/rs/zerolog v1.30.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240219152510-85226a0fbdc1
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240310203442-c2f41d4f438f
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e
github.com/smartcontractkit/chainlink-testing-framework v1.23.6
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240221052856-2cd4bc5508e2
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1399,8 +1399,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429 h1:xkejUBZhcBpBrTSfxc91Iwzadrb6SXw8ks69bHIQ9Ww=
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240118014648-1ab6a88c9429/go.mod h1:wJmVvDf4XSjsahWtfUq3wvIAYEAuhr7oxmxYnEL/LGQ=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240219152510-85226a0fbdc1 h1:MNYkjakmoKxg7L1nmfAVeFOdONaLT7E62URBpmcTh84=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240219152510-85226a0fbdc1/go.mod h1:6aXWSEQawX2oZXcPPOdxnEGufAhj7PqPKolXf6ijRGA=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240310203442-c2f41d4f438f h1:1et8C/1Ze/w02VJs7zHpY4XIJ9DD4ihsQFmPyVQMjMc=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240310203442-c2f41d4f438f/go.mod h1:ftihcSXX2W0CPHEb0p70BRbZbIjgI0D25bkInYFgcEA=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240214203158-47dae5de1336 h1:j00D0/EqE9HRu+63v7KwUOe4ZxLc4AN5SOJFiinkkH0=
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/source_envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *envelopeSource) Fetch(ctx context.Context) (interface{}, error) {
if err != nil {
return nil, fmt.Errorf("failed to fetch state from on-chain: %w", err)
}
contractConfig, err := pkgSolana.ConfigFromState(state)
contractConfig, err := pkgSolana.ConfigFromState(ctx, state)
if err != nil {
return nil, fmt.Errorf("failed to decode ContractConfig from on-chain state: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/solana/cmd/chainlink-solana/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (c *pluginRelayer) NewRelayer(ctx context.Context, config string, keystore
if err != nil {
return nil, fmt.Errorf("failed to create chain: %w", err)
}
ra := &loop.RelayerAdapter{Relayer: solana.NewRelayer(c.Logger, chain), RelayerExt: chain}
ra := solana.NewRelayer(c.Logger, chain)

c.SubService(ra)

Expand Down
7 changes: 4 additions & 3 deletions pkg/solana/config_digester.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package solana

import (
"context"
"crypto/sha256"
"encoding/binary"
"fmt"
Expand All @@ -22,7 +23,7 @@ type OffchainConfigDigester struct {
}

// ConfigDigest is meant to do the same thing as config_digest_from_data from the program.
func (d OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.ConfigDigest, error) {
func (d OffchainConfigDigester) ConfigDigest(ctx context.Context, cfg types.ContractConfig) (types.ConfigDigest, error) {
digest := types.ConfigDigest{}
buf := sha256.New()

Expand Down Expand Up @@ -87,7 +88,7 @@ func (d OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.Co
return digest, fmt.Errorf("incorrect hash size %d, expected %d", n, len(digest))
}

pre, err := d.ConfigDigestPrefix()
pre, err := d.ConfigDigestPrefix(ctx)
if err != nil {
return digest, err
}
Expand All @@ -97,6 +98,6 @@ func (d OffchainConfigDigester) ConfigDigest(cfg types.ContractConfig) (types.Co
}

// This should return the same constant value on every invocation
func (OffchainConfigDigester) ConfigDigestPrefix() (types.ConfigDigestPrefix, error) {
func (OffchainConfigDigester) ConfigDigestPrefix(ctx context.Context) (types.ConfigDigestPrefix, error) {
return types.ConfigDigestPrefixSolana, nil
}
6 changes: 4 additions & 2 deletions pkg/solana/config_digester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
bin "github.com/gagliardetto/binary"
"github.com/gagliardetto/solana-go"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
)

func TestConfigDigester(t *testing.T) {
Expand All @@ -22,10 +24,10 @@ func TestConfigDigester(t *testing.T) {
var state State
err = bin.NewBorshDecoder(mockState.Raw).Decode(&state)
require.NoError(t, err)
config, err := ConfigFromState(state)
config, err := ConfigFromState(tests.Context(t), state)
require.NoError(t, err)

actualDigest, err := digester.ConfigDigest(config)
actualDigest, err := digester.ConfigDigest(tests.Context(t), config)
require.NoError(t, err)

expectedDigest := mockState.ConfigDigestHex
Expand Down
6 changes: 3 additions & 3 deletions pkg/solana/config_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (c *ConfigTracker) LatestConfigDetails(ctx context.Context) (changedInBlock
return state.Config.LatestConfigBlockNumber, state.Config.LatestConfigDigest, err
}

func ConfigFromState(state State) (types.ContractConfig, error) {
func ConfigFromState(ctx context.Context, state State) (types.ContractConfig, error) {
pubKeys := []types.OnchainPublicKey{}
accounts := []types.Account{}
oracles, err := state.Oracles.Data()
Expand All @@ -43,7 +43,7 @@ func ConfigFromState(state State) (types.ContractConfig, error) {
Max: state.Config.MaxAnswer.BigInt(),
}

onchainConfig, err := median.StandardOnchainConfigCodec{}.Encode(onchainConfigStruct)
onchainConfig, err := median.StandardOnchainConfigCodec{}.Encode(ctx, onchainConfigStruct)
if err != nil {
return types.ContractConfig{}, err
}
Expand All @@ -70,7 +70,7 @@ func (c *ConfigTracker) LatestConfig(ctx context.Context, changedInBlock uint64)
if err != nil {
return types.ContractConfig{}, err
}
return ConfigFromState(state)
return ConfigFromState(ctx, state)
}

// LatestBlockHeight returns the height of the most recent block in the chain.
Expand Down
4 changes: 2 additions & 2 deletions pkg/solana/monitor/balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ func (b *balanceMonitor) Name() string {
}

func (b *balanceMonitor) Start(context.Context) error {
return b.StartOnce("SolanaBalanceMonitor", func() error {
return b.StartOnce("BalanceMonitor", func() error {
go b.monitor()
return nil
})
}

func (b *balanceMonitor) Close() error {
return b.StopOnce("SolanaBalanceMonitor", func() error {
return b.StopOnce("BalanceMonitor", func() error {
close(b.stop)
<-b.done
return nil
Expand Down
65 changes: 35 additions & 30 deletions pkg/solana/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ package solana
import (
"context"
"encoding/json"
"math/big"

"github.com/gagliardetto/solana-go"
"github.com/pkg/errors"

"github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median"
"github.com/smartcontractkit/libocr/offchainreporting2/types"

relaylogger "github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/services"
relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types"

"github.com/smartcontractkit/chainlink-solana/pkg/solana/client"
"github.com/smartcontractkit/chainlink-solana/pkg/solana/logger"
"github.com/smartcontractkit/chainlink-solana/pkg/solana/txm"
)

Expand All @@ -28,20 +28,15 @@ type TxManager interface {
var _ relaytypes.Relayer = &Relayer{}

type Relayer struct {
lggr logger.Logger
chain Chain
ctx context.Context
cancel func()
lggr logger.Logger
chain Chain
}

// Note: constructed in core
func NewRelayer(lggr logger.Logger, chain Chain) *Relayer {
ctx, cancel := context.WithCancel(context.Background())
return &Relayer{
lggr: lggr,
chain: chain,
ctx: ctx,
cancel: cancel,
lggr: logger.Named(lggr, "Relayer"),
chain: chain,
}
}

Expand All @@ -50,51 +45,61 @@ func (r *Relayer) Name() string {
}

// Start starts the relayer respecting the given context.
func (r *Relayer) Start(context.Context) error {
func (r *Relayer) Start(ctx context.Context) error {
// No subservices started on relay start, but when the first job is started
if r.chain == nil {
return errors.New("Solana unavailable")
}
return nil
return r.chain.Start(ctx)
}

// Close will close all open subservices
func (r *Relayer) Close() error {
r.cancel()
return nil
}
func (r *Relayer) Close() error { return r.chain.Close() }

func (r *Relayer) Ready() error {
return r.chain.Ready()
}

// Healthy only if all subservices are healthy
func (r *Relayer) Healthy() error { return nil }

func (r *Relayer) HealthReport() map[string]error {
return map[string]error{r.Name(): r.Healthy()}
hp := map[string]error{r.Name(): r.Healthy()}
services.CopyHealth(hp, r.chain.HealthReport())
return hp
}

func (r *Relayer) GetChainStatus(ctx context.Context) (relaytypes.ChainStatus, error) {
return r.chain.GetChainStatus(ctx)
}

func (r *Relayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []relaytypes.NodeStatus, nextPageToken string, total int, err error) {
return r.chain.ListNodeStatuses(ctx, pageSize, pageToken)
}

func (r *Relayer) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error {
return r.chain.Transact(ctx, from, to, amount, balanceCheck)
}

func (r *Relayer) NewMercuryProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MercuryProvider, error) {
func (r *Relayer) NewMercuryProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MercuryProvider, error) {
return nil, errors.New("mercury is not supported for solana")
}

func (r *Relayer) NewLLOProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.LLOProvider, error) {
func (r *Relayer) NewLLOProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.LLOProvider, error) {
return nil, errors.New("data streams is not supported for solana")
}

func (r *Relayer) NewConfigProvider(args relaytypes.RelayArgs) (relaytypes.ConfigProvider, error) {
configWatcher, err := newConfigProvider(r.ctx, r.lggr, r.chain, args)
func (r *Relayer) NewConfigProvider(ctx context.Context, args relaytypes.RelayArgs) (relaytypes.ConfigProvider, error) {
configWatcher, err := newConfigProvider(ctx, r.lggr, r.chain, args)
if err != nil {
// Never return (*configProvider)(nil)
return nil, err
}
return configWatcher, err
}

func (r *Relayer) NewMedianProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) {
lggr := relaylogger.Named(r.lggr, "MedianProvider")
configWatcher, err := newConfigProvider(r.ctx, lggr, r.chain, rargs)
func (r *Relayer) NewMedianProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) {
lggr := logger.Named(r.lggr, "MedianProvider")
configWatcher, err := newConfigProvider(ctx, lggr, r.chain, rargs)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -140,11 +145,11 @@ func (r *Relayer) NewMedianProvider(rargs relaytypes.RelayArgs, pargs relaytypes
}, nil
}

func (r *Relayer) NewFunctionsProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.FunctionsProvider, error) {
func (r *Relayer) NewFunctionsProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.FunctionsProvider, error) {
return nil, errors.New("functions are not supported for solana")
}

func (r *Relayer) NewAutomationProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.AutomationProvider, error) {
func (r *Relayer) NewAutomationProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.AutomationProvider, error) {
return nil, errors.New("automation is not supported for solana")
}

Expand All @@ -162,7 +167,7 @@ type configProvider struct {
}

func newConfigProvider(ctx context.Context, lggr logger.Logger, chain Chain, args relaytypes.RelayArgs) (*configProvider, error) {
lggr = relaylogger.Named(lggr, "ConfigProvider")
lggr = logger.Named(lggr, "ConfigProvider")
var relayConfig RelayConfig
err := json.Unmarshal(args.RelayConfig, &relayConfig)
if err != nil {
Expand Down Expand Up @@ -289,6 +294,6 @@ func (p *medianProvider) Codec() relaytypes.Codec {
return nil
}

func (r *Relayer) NewPluginProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.PluginProvider, error) {
func (r *Relayer) NewPluginProvider(ctx context.Context, rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.PluginProvider, error) {
return nil, errors.New("plugin provider is not supported for solana")
}
Loading

0 comments on commit 54a92d0

Please sign in to comment.