Add additional method detection patterns and support for new RPC methods (#730)

* Add additional method detection patterns and support for new RPC methods

* Add additional RPC method detections and error handling for missing arguments
This commit is contained in:
Anton
2025-10-07 11:31:13 +03:00
committed by GitHub
parent b7f6f4b0d4
commit a78b72487a
3 changed files with 94 additions and 1 deletions

View File

@@ -20,6 +20,8 @@ abstract class UpstreamRpcMethodsDetector(
"([A-Za-z0-9_]+) found but the containing module is disabled",
"[Mm]ethod not found",
"The method ([A-Za-z0-9_]+) is not available",
"The method '([A-Za-z0-9_]+)' is not supported.",
"No response for method ([A-Za-z0-9_]+)",
).map { s -> s.toRegex() }
private val availableRegexps =

View File

@@ -35,6 +35,9 @@ class BasicEthUpstreamRpcMethodsDetector(
"eth_getBlockReceipts" to ListParams("latest"),
"trace_callMany" to ListParams(listOf(listOf<Any>())),
"eth_simulateV1" to ListParams(listOf()),
"debug_storageRangeAt" to ListParams(listOf()),
"eth_getTdByNumber" to ListParams(listOf()),
"eth_callBundle" to ListParams(listOf()),
)
private fun parseRpcModules(data: ByteArray): Map<String, Boolean> {