aboutsummaryrefslogtreecommitdiff
path: root/plugin/main.go
diff options
context:
space:
mode:
authorStephenButtolph <[email protected]>2020-04-15 00:10:02 -0400
committerStephenButtolph <[email protected]>2020-04-15 00:10:02 -0400
commitc344c77d2924cde119efaeb57b4d3e33049e7896 (patch)
treeba641c086b70617dac0dcaad8c0b28965585f4b4 /plugin/main.go
parent895d39227cee283699f2602861386e96f554ea95 (diff)
Added the EVM as a plugin
Diffstat (limited to 'plugin/main.go')
-rw-r--r--plugin/main.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugin/main.go b/plugin/main.go
new file mode 100644
index 0000000..3f221da
--- /dev/null
+++ b/plugin/main.go
@@ -0,0 +1,20 @@
+package main
+
+import (
+ "github.com/hashicorp/go-plugin"
+
+ "github.com/ava-labs/gecko/vms/rpcchainvm"
+ "github.com/ava-labs/gecko/x/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,
+ })
+}