From 7981c59502a99b6f7938a18b6ae5c3803cf0a794 Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Thu, 16 Apr 2020 01:03:21 -0400 Subject: Revert "Revert "Added the EVM as a plugin"" --- plugin/evm/static_service.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 plugin/evm/static_service.go (limited to 'plugin/evm/static_service.go') 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 +} -- cgit v1.2.3