Can you please tell me if I am forming a parameter block for the eth_estimateGas method

$params = (object)Array(
‘to’ =>‘0x3eF7e69a828e3F9EDF5293241cD64Cc0bbD52743’
$result = $this ->request(‘eth_estimateGas’,json_encode($params));

as a result of the request, I get an answer with an error

[code] => -32600 [message] => invalid json request )

Have you checked out the documentation here,

Yes, I studied the documentation, but there are no instructions in it how to create a TRANSACTION CALL OBJECT, there is only an example of data. That is what I floatra. in my code, it is completely identical to the example, but returns an error.
In my example code, I create this data json_encode($params)
‘[{“to”: “0xd46e8dd67c5d32be8058bb8eb970870f07244567”}]’;
which is identical to the data in the documentation.

I’m not familiar with PHP, but using the address you provided, this request works in Python

import requests

api_key = "YOURAPIKEY"
url = ""+api_key

ethmethod = "eth_estimateGas"
ethparam = [{"to":"0x3eF7e69a828e3F9EDF5293241cD64Cc0bbD52743"}]
ethheader = {"Content-type":"application/json"}

payload = {"jsonrpc":"2.0","method":ethmethod,"params":ethparam,"id":1}

blockjson =, json=payload, headers=ethheader)

for it in blockjson:



Let me know if this helps.

I tried to substitute the result line in the query.
‘{“jsonrpc”:“2.0”,“method”:“eth_estimateGas”,“params”: [{“to”:“0x3eF7e69a828e3F9EDF5293241cD64Cc0bbD52743”}],“id”:1}’;
also received a response similar to yours. The only question is what is the data type of your “ethparam” variable. May I ask you to display its data type?

I think I found a solution for PHP:

$params = Array(
‘to’ =>‘0x3eF7e69a828e3F9EDF5293241cD64Cc0bbD52743’
$params = Array($params);
$result = $this ->request(‘eth_estimateGas’,json_encode($params));

So I use the array nested in each other. It looks very strange, but it works.

ethparam is a python list

I’m glad you got it working though!