diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt index a69045f0..ae2fc8ce 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt @@ -82,6 +82,7 @@ class DefaultEthereumMethods( ) private val firstValueMethods = listOf( + "eth_call", "eth_getBlockTransactionCountByHash", "eth_getUncleCountByBlockHash", "eth_getBlockByHash", @@ -148,7 +149,6 @@ class DefaultEthereumMethods( possibleNotIndexedMethods.contains(method) -> NotNullQuorum() specialMethods.contains(method) -> { when (method) { - "eth_call" -> AlwaysQuorum() "eth_getTransactionCount" -> AlwaysQuorum() "eth_getBalance" -> AlwaysQuorum() "eth_sendRawTransaction" -> BroadcastQuorum() diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy index 1c496740..cbec7b31 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy @@ -87,4 +87,37 @@ class DefaultEthereumMethodsSpec extends Specification { then: act.isEmpty() } + + def "Default eth methods are available"() { + setup: + def methods = new DefaultEthereumMethods(Chain.ETHEREUM__MAINNET) + expect: + methods.isAvailable(method) + where: + method | _ + "eth_gasPrice" | _ + "eth_estimateGas" | _ + "eth_getBlockTransactionCountByHash" | _ + "eth_getUncleCountByBlockHash" | _ + "eth_getBlockByHash" | _ + "eth_getBlockByNumber" | _ + "eth_getTransactionByBlockHashAndIndex" | _ + "eth_getTransactionByBlockNumberAndIndex" | _ + "eth_getStorageAt" | _ + "eth_getCode" | _ + "eth_getUncleByBlockHashAndIndex" | _ + "eth_getLogs" | _ + "eth_maxPriorityFeePerGas" | _ + "eth_getTransactionByHash" | _ + "eth_getTransactionReceipt" | _ + "eth_call" | _ + "eth_getTransactionCount" | _ + "eth_blockNumber" | _ + "eth_getBalance" | _ + "eth_sendRawTransaction" | _ + "eth_getBlockTransactionCountByNumber" | _ + "eth_getUncleCountByBlockNumber" | _ + "eth_getUncleByBlockNumberAndIndex" | _ + "eth_feeHistory" | _ + } }