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. 10
      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 ### eth_estimateGas
Returns an estimate of how much gas is needed for the transaction to complete. The estimate process does not use Returns an estimate of how much gas is needed for a transaction to complete. The estimation 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 gas and the transaction is not added to the blockchain. The resulting estimate can be greater than the amount of
transaction actually uses, for reasons including EVM mechanics and node performance. 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 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** **Parameters**
!!!note The transaction call object parameters are the same as those for [eth_call](#eth_call), except that in `eth_estimateGas`,
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
all fields are optional. If you do not specify a `gas` amount in the transaction call object, Pantheon uses the limits apply).
`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.
*OBJECT* - [Transaction call object](JSON-RPC-API-Objects.md#transaction-call-object). *OBJECT* - [Transaction call object](JSON-RPC-API-Objects.md#transaction-call-object).

@ -123,13 +123,13 @@ Parameter for [eth_call](JSON-RPC-API-Methods.md#eth_call) and [eth_estimateGas]
All parameters are optional for [eth_estimateGas](JSON-RPC-API-Methods.md#eth_estimategas) All parameters are optional for [eth_estimateGas](JSON-RPC-API-Methods.md#eth_estimategas)
| Key | Type | Required/Optional | Value | | Key | Type | Required/Optional | Value |
|--------------|:-------------------:|:-----------------:|--------------------------------------------------------------------------------------------------------------------------------| |--------------|:-------------------:|:-----------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **from** | Data, 20&nbsp;bytes | Optional | Address from which transaction sent. | | **from** | Data, 20&nbsp;bytes | Optional | Address from which transaction is sent. |
| **to** | Data, 20&nbsp;bytes | Required | Address to which transaction is directed. | | **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. | | **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 | gasPrice used for each paid gas. | | **gasPrice** | Quantity, Integer | Optional | Price used for each paid gas. |
| **value** | Quantity, Integer | Optional | Value sent with this transaction. | | **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. | | **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 ## Transaction Receipt Object

Loading…
Cancel
Save