Learn R Programming

gethr (version 0.1.0)

eth_estimateGas: Estimation of the gas.

Description

eth_estimateGas returns an estimate of how much gas is necessary to allow the transaction to complete.

Usage

eth_estimateGas(to, data)

Arguments

to

Address - Address the call is send to.

data

Data - Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI https://solidity.readthedocs.io/en/develop/abi-spec.html.

Value

Integer - Amount of gas estimated.

Details

The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.

See Also

Other eth functions: eth_accounts, eth_blockNumber, eth_call, eth_coinbase, eth_gasPrice, eth_getBalance, eth_getBlockByHash, eth_getBlockByNumber, eth_getBlockTransactionCountByHash, eth_getBlockTransactionCountByNumber, eth_getCode, eth_getFilterChanges, eth_getFilterLogs, eth_getLogs, eth_getProof, eth_getStorageAt, eth_getTransactionByBlockHashAndIndex, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByHash, eth_getTransactionCount, eth_getTransactionReceipt, eth_getUncleByBlockHashAndIndex, eth_getUncleByBlockNumberAndIndex, eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_getWork, eth_hashrate, eth_mining, eth_newBlockFilter, eth_newFilter, eth_newPendingTransactionFilter, eth_protocolVersion, eth_sendRawTransaction, eth_sendTransaction, eth_sign, eth_submitHashrate, eth_submitWork, eth_syncing, eth_uninstallFilter, gethr, personal_sendTransaction

Examples

Run this code
# NOT RUN {
eth_estimateGas(to = '0xcaf9a0356ddfa779fdbb55c45b22d35673550f30', data =
'0x8f8a0d1900000000000000000000000000000000000000000000000000000000000000
060000000000000000000000000000000000000000000000000000000000000002')
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab