Skip to content

Commit

Permalink
Compensate dynamic fee transation fees by 100% estimation increase (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Aug 30, 2023
1 parent 33e0967 commit 1095172
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions txrelayer/txrelayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 1095172

Please sign in to comment.