Skip to content

Commit

Permalink
internal/ethapi: add document for DoEstimateGas
Browse files Browse the repository at this point in the history
Signed-off-by: jsvisa <[email protected]>
  • Loading branch information
jsvisa committed Aug 1, 2023
1 parent 21dffcb commit aa47d01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,8 @@ func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrO
return result.Return(), result.Err
}

// DoEstimateGas estimates the gas needed to execute a specific transaction.
// Note, the flag noBaseFee indicating whether to skip the base fee check
func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, gasCap uint64, noBaseFee bool) (hexutil.Uint64, error) {
// Binary search the gas requirement, as it may be higher than the amount used
var (
Expand Down

0 comments on commit aa47d01

Please sign in to comment.