Skip to content

Примеры ответов от eth с ошибкой

Danil Pismenny edited this page Sep 13, 2021 · 4 revisions

Пытаемся посчитать газ (execution failed)

curl -v -X POST -H 'User-Agent: Faraday v1.5.1' -H 'Accept: application/json' -H 'Content-Type: application/json' -d \
'{"jsonrpc":"2.0","id":10,"method":"eth_estimateGas","params":[{"gasPrice":"0x12a6f9cc80","from":"0x97d92440fce7096eb7d3859d790ccaae6adb6bee","to":"0xdac17f958d2ee523a2206206994597c13d831ec7","data":"0xa9059cbb00000000000000000000000047e7be974bbc24acd1e06ad64624638090afa38b0000000000000000000000000000000000000000000000000000000000000001"}]}' "http://172.16.0.65:8545/"
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32016,
    "message": "The execution failed due to an exception.",
    "data": "Bad instruction fe"
  },
  "id": 10
}

Execution error

Запрос:

{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "eth_estimateGas",
  "params": [
    {
      "gasPrice": "0x1b6f2970f1",
      "from": "0x97d92440fce7096eb7d3859d790ccaae6adb6bee",
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "data": "0xa9059cbb0000000000000000000000008a988dc81b42be7a3ad343c4d4fa3eac3ead3dc40000000000000000000000000000000000000000000000000000000000000001"
    }
  ]
}

Ответ

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32015,
    "message": "Transaction execution error.",
    "data": "Internal(\"Requires higher than upper limit of 300292660\")"
  },
  "id": 11
}