@@ -33,74 +33,6 @@ const maxFeeHistoryBlockCount = 1024
3333
3434var baseFeesPerGas = big .NewInt (1 )
3535
36- // A map containing all the valid method names that are found
37- // in the Ethereum JSON-RPC API specification.
38- // Update accordingly if any new methods are added/removed.
39- var validMethods = map [string ]struct {}{
40- // eth namespace
41- "eth_blockNumber" : {},
42- "eth_syncing" : {},
43- "eth_sendRawTransaction" : {},
44- "eth_getBalance" : {},
45- "eth_getTransactionByHash" : {},
46- "eth_getTransactionByBlockHashAndIndex" : {},
47- "eth_getTransactionByBlockNumberAndIndex" : {},
48- "eth_getTransactionReceipt" : {},
49- "eth_getBlockByHash" : {},
50- "eth_getBlockByNumber" : {},
51- "eth_getBlockReceipts" : {},
52- "eth_getBlockTransactionCountByHash" : {},
53- "eth_getBlockTransactionCountByNumber" : {},
54- "eth_call" : {},
55- "eth_getLogs" : {},
56- "eth_getTransactionCount" : {},
57- "eth_estimateGas" : {},
58- "eth_getCode" : {},
59- "eth_feeHistory" : {},
60- "eth_getStorageAt" : {},
61- "eth_chainId" : {},
62- "eth_coinbase" : {},
63- "eth_gasPrice" : {},
64- "eth_getUncleCountByBlockHash" : {},
65- "eth_getUncleCountByBlockNumber" : {},
66- "eth_getUncleByBlockHashAndIndex" : {},
67- "eth_getUncleByBlockNumberAndIndex" : {},
68- "eth_maxPriorityFeePerGas" : {},
69- "eth_mining" : {},
70- "eth_hashrate" : {},
71- "eth_getProof" : {},
72- "eth_createAccessList" : {},
73-
74- // debug namespace
75- "debug_traceTransaction" : {},
76- "debug_traceBlockByNumber" : {},
77- "debug_traceBlockByHash" : {},
78- "debug_traceCall" : {},
79- "debug_flowHeightByBlock" : {},
80-
81- // web3 namespace
82- "web3_clientVersion" : {},
83- "web3_sha3" : {},
84-
85- // net namespace
86- "net_listening" : {},
87- "net_peerCount" : {},
88- "net_version" : {},
89-
90- // txpool namespace
91- "txpool_content" : {},
92- "txpool_contentFrom" : {},
93- "txpool_status" : {},
94- "txpool_inspect" : {},
95- }
96-
97- // Returns whether the given method name is a valid method from
98- // the Ethereum JSON-RPC API specification.
99- func IsValidMethod (methodName string ) bool {
100- _ , ok := validMethods [methodName ]
101- return ok
102- }
103-
10436var latestBlockNumberOrHash = rpc .BlockNumberOrHashWithNumber (rpc .LatestBlockNumber )
10537
10638func SupportedAPIs (
0 commit comments