From 657292534e87ecb8e2ae56a17244af188ca1075b Mon Sep 17 00:00:00 2001 From: Goran Rojovic Date: Tue, 12 Mar 2024 09:25:55 +0100 Subject: [PATCH] fix --- jsonrpc/eth_endpoint.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jsonrpc/eth_endpoint.go b/jsonrpc/eth_endpoint.go index 4527fe32a0..194101a5bd 100644 --- a/jsonrpc/eth_endpoint.go +++ b/jsonrpc/eth_endpoint.go @@ -590,7 +590,13 @@ func (e *Eth) EstimateGas(arg *txnArgs, rawNum *BlockNumber) (interface{}, error highEnd = header.GasLimit } - gasPriceInt := new(big.Int).Set(transaction.GasPrice()) + gasPriceInt := big.NewInt(0) + gasprice := transaction.GasPrice() + + if gasprice != nil { // if dynamic transaction this will be nil + gasPriceInt.Set(gasprice) + } + valueInt := new(big.Int).Set(transaction.Value()) var availableBalance *big.Int