aboutsummaryrefslogtreecommitdiff
path: root/plugin/main.go
diff options
context:
space:
mode:
authorStephen Buttolph <[email protected]>2020-04-16 00:59:07 -0400
committerGitHub <[email protected]>2020-04-16 00:59:07 -0400
commitae13dfb64a82d35d6c9607bc61dcf1ac21e59f85 (patch)
tree24ef681a6c846ba58ce2b8db2fa436c10404172b /plugin/main.go
parent895d39227cee283699f2602861386e96f554ea95 (diff)
parent29ff5bc77bf4be974acc99c160bfc569f3dd43d6 (diff)
Merge pull request #2 from ava-labs/plugin
Added the EVM as a plugin
Diffstat (limited to 'plugin/main.go')
-rw-r--r--plugin/main.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugin/main.go b/plugin/main.go
new file mode 100644
index 0000000..f5c9909
--- /dev/null
+++ b/plugin/main.go
@@ -0,0 +1,21 @@
+package main
+
+import (
+ "github.com/hashicorp/go-plugin"
+
+ "github.com/ava-labs/gecko/vms/rpcchainvm"
+
+ "github.com/ava-labs/coreth/plugin/evm"
+)
+
+func main() {
+ plugin.Serve(&plugin.ServeConfig{
+ HandshakeConfig: rpcchainvm.Handshake,
+ Plugins: map[string]plugin.Plugin{
+ "vm": rpcchainvm.New(&evm.VM{}),
+ },
+
+ // A non-nil value here enables gRPC serving for this plugin...
+ GRPCServer: plugin.DefaultGRPCServer,
+ })
+}