From e9d5ff78e5574140e6bc67226e4278f7cb84c311 Mon Sep 17 00:00:00 2001 From: ylsGit Date: Mon, 15 Jul 2024 11:25:36 +0800 Subject: [PATCH] Merge PR: fix (#3313) Co-authored-by: xiangjianmeng <805442788@qq.com> --- app/rpc/namespaces/eth/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rpc/namespaces/eth/api.go b/app/rpc/namespaces/eth/api.go index f50d4d8399..fd40d96227 100644 --- a/app/rpc/namespaces/eth/api.go +++ b/app/rpc/namespaces/eth/api.go @@ -1122,7 +1122,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") @@ -1673,7 +1673,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 }