Skip to content

Commit

Permalink
bump libocr; add context
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Aug 1, 2024
1 parent 02a42e0 commit 03e9d9e
Show file tree
Hide file tree
Showing 16 changed files with 185 additions and 173 deletions.
44 changes: 23 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/smartcontractkit/chainlink-solana

go 1.21.6

replace github.com/smartcontractkit/libocr => github.com/jmank88/libocr v0.0.0-20240730201038-dd02ae81cc0a

require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/gagliardetto/binary v0.7.7
Expand All @@ -14,11 +16,11 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/pelletier/go-toml/v2 v2.2.0
github.com/prometheus/client_golang v1.17.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712101200-5b11e6cc6e86
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696
github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e
github.com/stretchr/testify v1.9.0
go.uber.org/zap v1.26.0
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7
golang.org/x/sync v0.7.0
golang.org/x/text v0.16.0
)
Expand All @@ -34,13 +36,13 @@ require (
github.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/confluentinc/confluent-kafka-go/v2 v2.3.0 // indirect
github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fxamacker/cbor/v2 v2.5.0 // indirect
github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
Expand Down Expand Up @@ -82,7 +84,7 @@ require (
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect
Expand All @@ -94,24 +96,24 @@ require (
go.mongodb.org/mongo-driver v1.15.0 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
95 changes: 48 additions & 47 deletions go.sum

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ require (
github.com/lib/pq v1.10.9
github.com/pelletier/go-toml/v2 v2.2.2
github.com/rs/zerolog v1.31.0
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240731121127-5ae22cf04996
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e
github.com/smartcontractkit/chainlink-testing-framework v1.33.0
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731214442-94aa60db8f38
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731214442-94aa60db8f38
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731133518-628ac00c4800
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731133518-628ac00c4800
github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
github.com/smartcontractkit/seth v1.0.12
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -357,10 +357,10 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/slack-go/slack v0.12.2 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
github.com/smartcontractkit/chainlink-automation v1.0.4 // indirect
github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240730204921-f38254c5b66f // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240718160222-2dc0c8136bfa // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240731133302-5fd73267ba3e // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240731133359-f2fc25580082 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
Expand All @@ -369,7 +369,7 @@ require (
github.com/smartcontractkit/wsrpc v0.8.1 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand Down
28 changes: 14 additions & 14 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1360,26 +1360,26 @@ github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ
github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCqR1LNS7aI3jT0V+xGrg=
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240731121127-5ae22cf04996 h1:6s4cTIE3NbATxWLrD5JLCq097PC5Y4GKK/Kk4fhURpY=
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240731121127-5ae22cf04996/go.mod h1:Jg1sCTsbxg76YByI8ifpFby3FvVqISStHT8ypy9ocmY=
github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240730204921-f38254c5b66f h1:ucwZwP4JTlwIQ5Ad4ihnLEBOIEzeXIbAgjvNb75oREg=
github.com/smartcontractkit/chainlink-automation v1.0.5-0.20240730204921-f38254c5b66f/go.mod h1:6NLIddgZJsBN9Y31jYP7mMLOy/iq1A8IUSTUINfBEOc=
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696 h1:iMHuXAXvo2MrqDJxHIox9+MdP3eYzYbdQVHzjA7rq+8=
github.com/smartcontractkit/chainlink-common v0.2.2-0.20240801162700-d8ba1275f696/go.mod h1:9y9QkenuRx6hCNN15ZlTreYV0N0LE5jQBYrrGTM7KYk=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240718160222-2dc0c8136bfa h1:g75H8oh2ws52s8BekwvGQ9XvBVu3E7WM1rfiA0PN0zk=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240718160222-2dc0c8136bfa/go.mod h1:wZvLHX/Sd9hskN51016cTFcT3G62KXVa6xbVDS7tRjc=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240731133302-5fd73267ba3e h1:AHT7l+UAVfn00jXAPicBwIckgYOg6ZzzoQ1rzOtGHhc=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240731133302-5fd73267ba3e/go.mod h1:cAULRiVmGiuGHEfYAf4yol6w4pw+lZ034bfO1bJUEfU=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240731133359-f2fc25580082 h1:VuB5Q1eJ/Xa14wd3rQECLuGiIsrjY6ZIChFM0WPwFqw=
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240731133359-f2fc25580082/go.mod h1:IRJkCV3rC28KYhbh9n2rhc3H04dnNVxSJrhkasYGPoA=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM=
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU=
github.com/smartcontractkit/chainlink-testing-framework v1.33.0 h1:vHQODEdsq5AIbRiyZZ30de6uwJUNFXLYvCr+Odr8TIs=
github.com/smartcontractkit/chainlink-testing-framework v1.33.0/go.mod h1:GrhHthZ5AmceF82+Ypw6Fov1EvB05JJbb1T0EKyO1x0=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8=
github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731214442-94aa60db8f38 h1:wMvFfYblC2mME2HzBVI96UJDI2gSNdPgRLxSZsK9p1I=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731214442-94aa60db8f38/go.mod h1:O95Ni59NPkOe82lAjeRUwU30zkOA+0cdeGN+9NPhQF4=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731214442-94aa60db8f38 h1:QDJq+3l1EdxUJJ1zpW2UkcyzcZU/S33h/a1945+qYPU=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731214442-94aa60db8f38/go.mod h1:yEWlmvPXqpG9FbY4OwvpLbmQUELz7KQ0ThRKMy6x0vY=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731133518-628ac00c4800 h1:38OKTAfZcGSyyO/egz1IDQ+clFkbRoGG7d1y2kNrZLU=
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240731133518-628ac00c4800/go.mod h1:x+dm0zKrJ5J/PHrbi1WxelptmUtTJsM5ffvbmxEcj+Q=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731133518-628ac00c4800 h1:b/fxzMbxx/pLmc5liWX+WFUmFPw5WLeRfXHJJ3GBTCk=
github.com/smartcontractkit/chainlink/v2 v2.10.0-beta0.0.20240731133518-628ac00c4800/go.mod h1:jIk1yaSyaM7CGhFX2r+vFTvQvN7XYdxt1egs7C6ChRc=
github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo=
github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
Expand Down Expand Up @@ -1407,8 +1407,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
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 @@ -64,7 +64,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 @@ -70,7 +70,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, capRegistry), RelayerExt: chain}
ra := solana.NewRelayer(c.Logger, chain, capRegistry)

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 @@ -20,7 +21,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 @@ -85,7 +86,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 @@ -95,6 +96,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 @@ -64,14 +64,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
Loading

0 comments on commit 03e9d9e

Please sign in to comment.