ethereum / wiki

The Ethereum Wiki
https://www.ethereum.org
14.75k stars 2.56k forks source link

eth_gasPrice format example has leading zeros #675

Closed nacho692 closed 4 years ago

nacho692 commented 5 years ago

It seems that the example on eth_gasPrice is wrong or the return type is wrong.

It specifies that the return value is a Quantity but the example has leading zeros.

QUANTITY - integer of the current gas price in wei.

// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":73}'

// Result
{
  "id":73,
  "jsonrpc": "2.0",
  "result": "0x09184e72a000" // 10000000000000
}

According to Hex Value Encoding it shouldn't.