Skip to content

Commit

Permalink
fix: vebo balance check
Browse files Browse the repository at this point in the history
  • Loading branch information
Amuhar committed Mar 3, 2025
1 parent 1ba7dc6 commit 3e732bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/0.8.9/oracle/ValidatorsExitBus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface IWithdrawalVault {
function getWithdrawalRequestFee() external view returns (uint256);
}


contract ValidatorsExitBus is AccessControlEnumerable {
using UnstructuredStorage for bytes32;

Expand Down Expand Up @@ -75,6 +74,7 @@ contract ValidatorsExitBus is AccessControlEnumerable {
/// @dev This function verifies that the hash of the provided exit request data exists in storage
// and ensures that the events for the requests specified in the `keyIndexes` array have already been delivered.
function triggerExits(ExitRequestData calldata request, uint256[] calldata keyIndexes) external payable {
uint256 prevBalance = address(this).balance - msg.value;
RequestStatus storage requestStatus = _storageExitRequestsHashes()[keccak256(abi.encode(request.data, request.dataFormat))];
bytes calldata data = request.data;

Expand All @@ -90,8 +90,6 @@ contract ValidatorsExitBus is AccessControlEnumerable {
revert InsufficientPayment(withdrawalFee, keyIndexes.length, msg.value);
}

// uint256 prevBalance = address(this).balance - msg.value;

uint256 lastDeliveredKeyIndex = requestStatus.deliveredItemsCount - 1;

bytes memory pubkeys = new bytes(keyIndexes.length * PUBLIC_KEY_LENGTH);
Expand Down Expand Up @@ -136,7 +134,7 @@ contract ValidatorsExitBus is AccessControlEnumerable {
emit MadeRefund(msg.sender, refund);
}

// assert(address(this).balance == prevBalance);
assert(address(this).balance == prevBalance);
}

Check warning

Code scanning / Slither

Dangerous strict equalities Medium


function _storeExitRequestHash(
Expand Down

0 comments on commit 3e732bf

Please sign in to comment.