diff --git a/pkg/loop/internal/relayer.go b/pkg/loop/internal/relayer.go index 86824d559..62214ef9f 100644 --- a/pkg/loop/internal/relayer.go +++ b/pkg/loop/internal/relayer.go @@ -447,3 +447,12 @@ func healthReport(s map[string]string) (hr map[string]error) { } return hr } + +// RegisterStandAloneProvider register the servers needed for a plugin provider, +// this is a workaround to test the Node API on EVM until the EVM relayer is loopifyed +func RegisterStandAloneProvider(s *grpc.Server, p types.PluginProvider) { + pb.RegisterServiceServer(s, &serviceServer{srv: p}) + pb.RegisterOffchainConfigDigesterServer(s, &offchainConfigDigesterServer{impl: p.OffchainConfigDigester()}) + pb.RegisterContractConfigTrackerServer(s, &contractConfigTrackerServer{impl: p.ContractConfigTracker()}) + pb.RegisterContractTransmitterServer(s, &contractTransmitterServer{impl: p.ContractTransmitter()}) +} diff --git a/pkg/loop/provider.go b/pkg/loop/provider.go new file mode 100644 index 000000000..ac2fafb65 --- /dev/null +++ b/pkg/loop/provider.go @@ -0,0 +1,14 @@ +package loop + +import ( + "google.golang.org/grpc" + + "github.com/smartcontractkit/chainlink-relay/pkg/loop/internal" + "github.com/smartcontractkit/chainlink-relay/pkg/types" +) + +// RegisterStandAloneProvider register the servers needed for a plugin provider, +// this is a workaround to test the Node API on EVM until the EVM relayer is loopifyed +func RegisterStandAloneProvider(s *grpc.Server, p types.PluginProvider) { + internal.RegisterStandAloneProvider(s, p) +}