Skip to content

Commit

Permalink
Revert "chore: format"
Browse files Browse the repository at this point in the history
This reverts commit 738c3dc.
  • Loading branch information
gzeoneth committed Oct 24, 2024
1 parent 738c3dc commit 1078d09
Show file tree
Hide file tree
Showing 11 changed files with 494 additions and 376 deletions.
15 changes: 10 additions & 5 deletions src/express-lane-auction/Balance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ library BalanceLib {
/// of this account is returned. Otherwise 0.
/// @param bal The balance to query
/// @param round The round to check the withdrawable balance in
function withdrawableBalanceAtRound(
Balance storage bal,
uint64 round
) internal view returns (uint256) {
function withdrawableBalanceAtRound(Balance storage bal, uint64 round)
internal
view
returns (uint256)
{
return round >= bal.withdrawalRound ? bal.balance : 0;
}

Expand Down Expand Up @@ -71,7 +72,11 @@ library BalanceLib {
/// @param round The round to check withdrawals against. A withdrawal after this round will be ignored
/// and the balance reduced anyway, withdrawals before or on this round will be respected
/// and the reduce will revert
function reduce(Balance storage bal, uint256 amount, uint64 round) internal {
function reduce(
Balance storage bal,
uint256 amount,
uint64 round
) internal {
uint256 balRnd = balanceAtRound(bal, round);
// we add a zero check since it's possible for the amount to be zero
// but even in that case the user must have some balance
Expand Down
9 changes: 4 additions & 5 deletions src/express-lane-auction/Burner.sol
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {ERC20BurnableUpgradeable} from
"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
import {
ERC20BurnableUpgradeable
} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
import "./Errors.sol";

/// @notice A simple contract that can burn any tokens that are transferred to it
/// Token must support the ERC20BurnableUpgradeable.burn(uint256) interface
contract Burner {
ERC20BurnableUpgradeable public immutable token;

constructor(
address _token
) {
constructor(address _token) {
if (_token == address(0)) {
revert ZeroAddress();
}
Expand Down
17 changes: 10 additions & 7 deletions src/express-lane-auction/ELCRound.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ library LatestELCRoundsLib {
/// @param rounds The stored resolved rounds
/// @return The last resolved elc round
/// @return The index of that last resolved round within the supplied array
function latestELCRound(
ELCRound[2] storage rounds
) internal view returns (ELCRound storage, uint8) {
function latestELCRound(ELCRound[2] storage rounds)
internal
view
returns (ELCRound storage, uint8)
{
ELCRound storage latestRound = rounds[0];
uint8 index = 0;
if (latestRound.round < rounds[1].round) {
Expand All @@ -34,10 +36,11 @@ library LatestELCRoundsLib {
/// @notice Finds the elc round that matches the supplied round. Reverts if no matching round found.
/// @param latestResolvedRounds The resolved elc rounds
/// @param round The round number to find a resolved round for
function resolvedRound(
ELCRound[2] storage latestResolvedRounds,
uint64 round
) internal view returns (ELCRound storage) {
function resolvedRound(ELCRound[2] storage latestResolvedRounds, uint64 round)
internal
view
returns (ELCRound storage)
{
if (latestResolvedRounds[0].round == round) {
return latestResolvedRounds[0];
} else if (latestResolvedRounds[1].round == round) {
Expand Down
Loading

0 comments on commit 1078d09

Please sign in to comment.