fixes #522 remove mention of gas setting from eth_estimateGas (#593)

* fixes #522 remove mention of gas setting from eth_estimateGas

* fixes #522 clarify that gasLimit is irrelevant to estimation

* fixes #522 clarifications on estimation process

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Donn Trenton 6 years ago committed by GitHub
parent 319ee2095c
commit 8fcee3222a
  1. 16
      docs/Reference/JSON-RPC-API-Methods.md
  2. 16
      docs/Reference/JSON-RPC-API-Objects.md

@ -817,20 +817,18 @@ You can interact with contracts using [eth_sendRawTransaction or eth_call](../Us
### eth_estimateGas
Returns an estimate of how much gas is needed for the transaction to complete. The estimate process does not use
gas and is not added to the blockchain as a transaction. The estimate can be greater than the amount of gas that the
transaction actually uses, for reasons including EVM mechanics and node performance.
Returns an estimate of how much gas is needed for a transaction to complete. The estimation process does not use
gas and the transaction is not added to the blockchain. The resulting estimate can be greater than the amount of
gas that the transaction actually uses, for various reasons including EVM mechanics and node performance.
The `eth_estimateGas` call does not send a transaction. You must make a subsequent call to
[eth_sendRawTransaction](#eth_sendRawTransaction) to execute the transaction.
[eth_sendRawTransaction](#eth_sendrawtransaction) to execute the transaction.
**Parameters**
!!!note
The transaction call object parameters are the same as those for [eth_call](#eth_call), except that in `eth_estimateGas`
all fields are optional. If you do not specify a `gas` amount in the transaction call object, Pantheon uses the
`gasLimit` amount from the block at the head of the chain as the upper limit. If the amount of gas needed is higher
than the estimated upper limit, the transaction might not have enough gas to execute.
The transaction call object parameters are the same as those for [eth_call](#eth_call), except that in `eth_estimateGas`,
all fields are optional. Setting a gas limit is irrelevant to the estimation process (unlike transactions, in which gas
limits apply).
*OBJECT* - [Transaction call object](JSON-RPC-API-Objects.md#transaction-call-object).

@ -122,14 +122,14 @@ Parameter for [eth_call](JSON-RPC-API-Methods.md#eth_call) and [eth_estimateGas]
!!!note
All parameters are optional for [eth_estimateGas](JSON-RPC-API-Methods.md#eth_estimategas)
| Key | Type | Required/Optional | Value |
|--------------|:-------------------:|:-----------------:|--------------------------------------------------------------------------------------------------------------------------------|
| **from** | Data, 20&nbsp;bytes | Optional | Address from which transaction sent. |
| **to** | Data, 20&nbsp;bytes | Required | Address to which transaction is directed. |
| **gas** | Quantity, Integer | Optional | Gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions. |
| **gasPrice** | Quantity, Integer | Optional | gasPrice used for each paid gas. |
| **value** | Quantity, Integer | Optional | Value sent with this transaction. |
| **data** | Data | Optional | Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI. |
| Key | Type | Required/Optional | Value |
|--------------|:-------------------:|:-----------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **from** | Data, 20&nbsp;bytes | Optional | Address from which transaction is sent. |
| **to** | Data, 20&nbsp;bytes | Required | Address to which transaction is directed. |
| **gas** | Quantity, Integer | Optional | Gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter might be needed by some executions. `eth_estimateGas` ignores this value. |
| **gasPrice** | Quantity, Integer | Optional | Price used for each paid gas. |
| **value** | Quantity, Integer | Optional | Value sent with this transaction. |
| **data** | Data | Optional | Hash of the method signature and encoded parameters. For details, see [Ethereum Contract ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI). |
## Transaction Receipt Object

Loading…
Cancel
Save