Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msg value refund #20

Merged
merged 7 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading