From 040344b1056d81ca20066c02d06f7a76eda6258a Mon Sep 17 00:00:00 2001 From: Hannah Brown <103233763+Pdayburt@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A4=E6=98=93=E8=B4=B9?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E8=AE=A1=E7=AE=97=E6=96=B9=E5=BC=8F=EF=BC=9A?= =?UTF-8?q?EffectiveGasPrice=E6=A0=87=E8=AF=86=E6=9C=80=E7=BB=88=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E7=9A=84=E8=B4=B9=E7=94=A8=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E6=98=AF=E5=90=A6EIP1559=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wallet/deposit.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wallet/deposit.go b/wallet/deposit.go index 51b8fa4..1c0c7bb 100644 --- a/wallet/deposit.go +++ b/wallet/deposit.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "math/big" - "strconv" "strings" "time" @@ -312,9 +311,9 @@ func (d *Deposit) processTransactions(txList []node.TransactionList, baseFee str continue } var gasPrice *big.Int - var transactionFee *big.Int + var transactionFee = big.NewInt(0) if (addressTo != nil && txReceipt.Status == 1) || (ccTx != nil && txReceipt.Status == 1) || (withdraw != nil && txReceipt.Status == 1) { - if txReceipt.Type == types.DynamicFeeTxType { + /*if txReceipt.Type == types.DynamicFeeTxType { gasPrice = txReceipt.EffectiveGasPrice baseFeeInt, _ := strconv.ParseInt(baseFee, 10, 64) transactionFee = new(big.Int).Add(gasPrice, big.NewInt(baseFeeInt)) @@ -322,7 +321,9 @@ func (d *Deposit) processTransactions(txList []node.TransactionList, baseFee str } else { gasPrice = txReceipt.EffectiveGasPrice transactionFee = new(big.Int).Mul(gasPrice, new(big.Int).SetUint64(txReceipt.GasUsed)) - } + }*/ + gasPrice = txReceipt.EffectiveGasPrice + transactionFee.Mul(gasPrice, big.NewInt(int64(txReceipt.GasUsed))) // 充值:to 是系统用户地址, from 地址是外部地址 if addressTo != nil && txReceipt.Status == 1 && addressFrom == nil {