diff --git a/pkg/solana/chainreader/bindings_test.go b/pkg/solana/chainreader/bindings_test.go index ee6287afe..d8b510648 100644 --- a/pkg/solana/chainreader/bindings_test.go +++ b/pkg/solana/chainreader/bindings_test.go @@ -58,6 +58,6 @@ func (_m *mockBinding) CreateType(b bool) (any, error) { return ret.Get(0), ret.Error(1) } -func (_ *mockBinding) Decode(_ context.Context, _ []byte, _ any) error { +func (_m *mockBinding) Decode(_ context.Context, _ []byte, _ any) error { return nil } diff --git a/pkg/solana/chainreader/chain_reader_test.go b/pkg/solana/chainreader/chain_reader_test.go index bf8b246dd..165be22e2 100644 --- a/pkg/solana/chainreader/chain_reader_test.go +++ b/pkg/solana/chainreader/chain_reader_test.go @@ -2,7 +2,6 @@ package chainreader_test import ( "context" - "encoding/base64" "encoding/json" "fmt" "math/big" @@ -680,52 +679,6 @@ func (r *wrappedTestChainReader) QueryKey(_ context.Context, _ types.BoundContra return nil, nil } -func getAddresses(t *testing.T, tester ChainComponentsInterfaceTester[*testing.T], contractName, readName string) (ag_solana.PublicKey, ag_solana.PublicKey) { - t.Helper() - - fn := ag_solana.MustPublicKeyFromBase58 - - var ( - addresses []string - found bool - ) - - for _, binding := range tester.GetBindings(t) { - if binding.Name == contractName { - encoded, err := base64.StdEncoding.DecodeString(binding.Address) - if err != nil { - t.Logf("%s", err) - t.FailNow() - } - - var readAddresses map[string][]string - - err = json.Unmarshal(encoded, &readAddresses) - if err != nil { - t.Logf("%s", err) - t.FailNow() - } - - var ok bool - - addresses, ok = readAddresses[readName] - if !ok { - t.Log("no addresses found") - t.FailNow() - } - - found = true - } - } - - if !found { - t.Log("no addresses found") - t.FailNow() - } - - return fn(addresses[0]), fn(addresses[1]) -} - func (r *wrappedTestChainReader) Bind(ctx context.Context, bindings []types.BoundContract) error { return r.service.Bind(ctx, bindings) }