aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/static_service.go
diff options
context:
space:
mode:
authorStephen Buttolph <stephen@avalabs.org>2020-04-16 00:59:07 -0400
committerGitHub <noreply@github.com>2020-04-16 00:59:07 -0400
commitae13dfb64a82d35d6c9607bc61dcf1ac21e59f85 (patch)
tree24ef681a6c846ba58ce2b8db2fa436c10404172b /plugin/evm/static_service.go
parent895d39227cee283699f2602861386e96f554ea95 (diff)
parent29ff5bc77bf4be974acc99c160bfc569f3dd43d6 (diff)
Merge pull request #2 from ava-labs/plugin
Added the EVM as a plugin
Diffstat (limited to 'plugin/evm/static_service.go')
-rw-r--r--plugin/evm/static_service.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugin/evm/static_service.go b/plugin/evm/static_service.go
new file mode 100644
index 0000000..d3870ca
--- /dev/null
+++ b/plugin/evm/static_service.go
@@ -0,0 +1,22 @@
+// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
+// See the file LICENSE for licensing terms.
+
+package evm
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/ava-labs/coreth/core"
+ "github.com/ava-labs/gecko/utils/formatting"
+)
+
+// StaticService defines the static API services exposed by the evm
+type StaticService struct{}
+
+// BuildGenesis returns the UTXOs such that at least one address in [args.Addresses] is
+// referenced in the UTXO.
+func (*StaticService) BuildGenesis(_ context.Context, args *core.Genesis) (formatting.CB58, error) {
+ bytes, err := json.Marshal(args)
+ return formatting.CB58{Bytes: bytes}, err
+}