Skip to content

Commit

Permalink
Merge pull request #20 from FastLane-Labs/msg-value-refund
Browse files Browse the repository at this point in the history
Msg value refund
  • Loading branch information
thogard785 authored Jan 24, 2024
2 parents 8af657f + 54878a4 commit 38e7243
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion contracts/auction-handler/FastLaneAuctionHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ contract FastLaneAuctionHandler is FastLaneAuctionHandlerEvents {
returns (uint256 bidAmount) {
emit RelayFastBid(msg.sender, block.coinbase, true, bidAmount, searcherToAddress);
} catch {
if (msg.value > 0) {
SafeTransferLib.safeTransferETH(
msg.sender,
msg.value
);
}
emit RelayFastBid(msg.sender, block.coinbase, false, 0, searcherToAddress);
}
}
Expand Down Expand Up @@ -513,7 +519,7 @@ contract FastLaneAuctionHandler is FastLaneAuctionHandlerEvents {
limitedReentrant(paymentProcessor)
validPayee
{
if (paymentProcessor == address(0)) revert RelayProcessorCannotBeZero();
if (paymentProcessor == address(0) || paymentProcessor == address(this)) revert RelayProcessorCannotBeZero();

address validator = getValidator();
uint256 validatorBalance = validatorsBalanceMap[validator] - 1;
Expand Down
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ bytecode_hash = "none"
names = true
sizes = true
gas_price = 60000000000
solc_version = '0.8.16'
solc_version = '0.8.20'
evm_version = 'paris'
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts-upgradeable

0 comments on commit 38e7243

Please sign in to comment.