From 109517239e02bb27a3fae5448660e4780bff657a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= <93934272+Stefan-Ethernal@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:27:57 +0200 Subject: [PATCH] Compensate dynamic fee transation fees by 100% estimation increase (#1859) --- txrelayer/txrelayer.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/txrelayer/txrelayer.go b/txrelayer/txrelayer.go index e93f053cb0..d03f63843c 100644 --- a/txrelayer/txrelayer.go +++ b/txrelayer/txrelayer.go @@ -16,12 +16,12 @@ import ( ) const ( - defaultGasPrice = 1879048192 // 0x70000000 - DefaultGasLimit = 5242880 // 0x500000 - DefaultRPCAddress = "http://127.0.0.1:8545" - numRetries = 1000 - gasLimitPercent = 100 - feeIncreasePercentage = 20 + defaultGasPrice = 1879048192 // 0x70000000 + DefaultGasLimit = 5242880 // 0x500000 + DefaultRPCAddress = "http://127.0.0.1:8545" + numRetries = 1000 + gasLimitIncreasePercentage = 100 + feeIncreasePercentage = 100 ) var ( @@ -173,7 +173,7 @@ func (t *TxRelayerImpl) sendTransactionLocked(txn *ethgo.Transaction, key ethgo. return ethgo.ZeroHash, fmt.Errorf("failed to estimate gas: %w", err) } - txn.Gas = gasLimit + (gasLimit * gasLimitPercent / 100) + txn.Gas = gasLimit + (gasLimit * gasLimitIncreasePercentage / 100) } signer := wallet.NewEIP155Signer(chainID.Uint64())