From 49378c94fac76253a3647ae016619b334f05a131 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Wed, 12 Jun 2024 17:55:20 +0800 Subject: [PATCH] ethclient: fix forwarding 1559 gas fields (#28462) --- ethclient/ethclient.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 4fa42355a0488..343fa837e40ef 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -579,5 +579,11 @@ func toCallArg(msg ethereum.CallMsg) interface{} { if msg.GasPrice != nil { arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice) } + if msg.GasFeeCap != nil { + arg["maxFeePerGas"] = (*hexutil.Big)(msg.GasFeeCap) + } + if msg.GasTipCap != nil { + arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap) + } return arg }