PHPH1 elephant logo

Description

  • Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. 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.

    There may be more information in the PHPH1 Class Documentation.

Parameters

  • Object - Smart contract call object

  • to - String :
    Wallet address sending to (ETH address, not ONE)
  • from - String :
    Wallet address sending from (ETH address, not ONE)
  • gas - Number :
    Gas to execute the smart contract call in hex, optional
  • gasPrice - Number :
    Gas price to execute smart contract call in hex, optional
  • value - Number:
    Value sent with the smart contract call in hex, optional
  • data - String:
    Hash of smart contract method and parameters, optional

Returns

  • String:
    Hex value of estimated gas price for the smart contract call