From 9e1e2a7194fe1b8e4b07222a65e6029dd80a33c1 Mon Sep 17 00:00:00 2001 From: Goran Rojovic <100121253+goran-ethernal@users.noreply.github.com> Date: Tue, 12 Mar 2024 10:15:55 +0100 Subject: [PATCH] fix (#152) --- 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