📝 Share Your Feedback on Twitter and Claim 1M Free GetBlock Requests

Method: POST miner_setGasLimit

dropdown

方法 GETH RPC miner_setGasLimit 例如 Ethereum (ETH)

POST miner_setGasLimit

Method not allowed

设置矿工在采矿时将靶向的气体限制。 注意:在激活EIP-1559的网络上,应将其设置为您想要的气体目标的两倍(即平均每块使用的有效气体)。

Parameters

number - 数字

气体限制

Request

curl --location --request POST 'https://geth.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "miner_setGasLimit",
"params": [null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}