Skip to content

Commit

Permalink
Initial draft
Browse files Browse the repository at this point in the history
  • Loading branch information
george-dorin committed Nov 7, 2023
1 parent 71f4b32 commit ee31659
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/loop/internal/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()})
}
14 changes: 14 additions & 0 deletions pkg/loop/provider.go
Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit ee31659

Please sign in to comment.