Skip to content

Commit

Permalink
Merge PR: fix (#3306)
Browse files Browse the repository at this point in the history
Co-authored-by: xiangjianmeng <805442788@qq.com>
  • Loading branch information
ylsGit and xiangjianmeng authored Jul 15, 2024
1 parent 88f26b4 commit a60c433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/rpc/namespaces/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ func (api *PublicEthereumAPI) simDoCall(args rpctypes.CallArgs, cap uint64) (uin
}

// EstimateGas returns an estimate of gas usage for the given smart contract call.
func (api *PublicEthereumAPI) EstimateGas(args rpctypes.CallArgs, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Uint64, error) {
func (api *PublicEthereumAPI) EstimateGas(args rpctypes.CallArgs, blockNrOrHash *rpctypes.BlockNumberOrHash) (hexutil.Uint64, error) {
monitor := monitor.GetMonitor("eth_estimateGas", api.logger, api.Metrics).OnBegin()
defer monitor.OnEnd("args", args)
rateLimiter := api.GetRateLimiter("eth_estimateGas")
Expand Down Expand Up @@ -1715,7 +1715,7 @@ func (api *PublicEthereumAPI) generateFromArgs(args rpctypes.SendTxArgs) (*evmty
Value: args.Value,
Data: &input,
}
gl, err := api.EstimateGas(callArgs, rpctypes.BlockNumberOrHash{})
gl, err := api.EstimateGas(callArgs, nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a60c433

Please sign in to comment.