Skip to content

Commit

Permalink
Remove all redundant functionality from JSON-RPC HTTP & WebSocket han…
Browse files Browse the repository at this point in the history
…dlers and add tests
  • Loading branch information
m-Peter committed Dec 20, 2023
1 parent 2b36693 commit 97553aa
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 528 deletions.
13 changes: 13 additions & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,24 @@ import (
"github.com/onflow/flow-go/fvm/evm/emulator"
)

const EthNamespace = "eth"

// this is added to resolve the issue with chainhash ambiguous import,
// the code is not used, but it's needed to force go.mod specify and retain chainhash version
// workaround for issue: https://github.com/golang/go/issues/27899
var _ = chainhash.Hash{}

func SupportedAPIs(store *storage.Store) []rpc.API {
return []rpc.API{
{
Namespace: EthNamespace,
Service: &BlockChainAPI{
Store: store,
},
},
}
}

type BlockChainAPI struct {
Store *storage.Store
}
Expand Down
Loading

0 comments on commit 97553aa

Please sign in to comment.