diff --git a/CHANGELOG.md b/CHANGELOG.md index 428d852d0..9526b2e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,6 +141,7 @@ corresponding Ethereum API namespace: ### API Breaking +* (eth) [\#845](https://github.com/cosmos/ethermint/pull/845) The `eth` namespace must be included in the list of API's as default to run the rpc server without error. * (types) [\#503](https://github.com/cosmos/ethermint/pull/503) The `types.DenomDefault` constant for `"aphoton"` has been renamed to `types.AttoPhoton`. ### Improvements diff --git a/rpc/apis.go b/rpc/apis.go index e1e7e7907..5798c8fd8 100644 --- a/rpc/apis.go +++ b/rpc/apis.go @@ -35,6 +35,21 @@ func GetAPIs(clientCtx client.Context, selectedApis []string, keys ...ethsecp256 var apis []rpc.API + apis = append(apis, + rpc.API{ + Namespace: EthNamespace, + Version: apiVersion, + Service: ethAPI, + Public: true, + }) + + apis = append(apis, rpc.API{ + Namespace: EthNamespace, + Version: apiVersion, + Service: filters.NewAPI(clientCtx, backend), + Public: true, + }) + for _, api := range selectedApis { switch api { case Web3Namespace: @@ -46,21 +61,6 @@ func GetAPIs(clientCtx client.Context, selectedApis []string, keys ...ethsecp256 Public: true, }, ) - case EthNamespace: - apis = append(apis, - rpc.API{ - Namespace: EthNamespace, - Version: apiVersion, - Service: ethAPI, - Public: true, - }, - rpc.API{ - Namespace: EthNamespace, - Version: apiVersion, - Service: filters.NewAPI(clientCtx, backend), - Public: true, - }, - ) case PersonalNamespace: apis = append(apis, rpc.API{