The getTxGasPriceForBidAmount
function in the ClankerSniperUtilV2
contract calculates the required transaction gas price for a specified bid amount in an auction. It ensures that the bid amount is valid and computes the gas price based on the auction's gas peg and the payment per gas unit.
auctionGasPeg
(uint256
): The base gas price set for the auction.desiredBidAmount
(uint256
): The target bid amount for which the gas price is being calculated.txGasPrice
(uint256
): The calculated transaction gas price needed for the specified bid amount.