Skip to content

Commit

Permalink
added a generic function to pay a fee to a specific validator
Browse files Browse the repository at this point in the history
  • Loading branch information
thogard785 committed Jan 24, 2024
1 parent 77a3293 commit 74c86b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions contracts/auction-handler/FastLaneAuctionHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ contract FastLaneAuctionHandler is FastLaneAuctionHandlerEvents {
emit RelayFeeCollected(_payor, block.coinbase, msg.value);
}

function paySpecificValidatorFee(address _validator) external payable nonReentrant {
// TODO: block this when _validator == block.coinbase?
if (msg.value == 0) revert RelayValueIsZero();
validatorsBalanceMap[_validator] += msg.value;
validatorsTotal += msg.value;
emit RelayFeeCollected(_validator, block.coinbase, msg.value);
}

// Part of the PaymentProcessor interface. In this case, this is used to transfer a validator's balances from one
// PFL contract to a new deployment.
function payValidator(address validator, uint256 startBlock, uint256 endBlock, uint256 totalAmount, bytes calldata)
Expand Down

0 comments on commit 74c86b2

Please sign in to comment.