Skip to content

Commit

Permalink
chore: oops
Browse files Browse the repository at this point in the history
  • Loading branch information
fp-crypto committed Apr 23, 2024
1 parent 9fd9d3b commit 29c54b1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
10 changes: 5 additions & 5 deletions src/Bases/Auctioneer/BaseAuctioneer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ abstract contract BaseAuctioneer is BaseHealthCheck, ReentrancyGuard {
* @return uint256 The amount that can be kicked into the auction.
*/
function kickable(bytes32 _auctionId)
external
public
view
virtual
returns (uint256)
Expand Down Expand Up @@ -328,7 +328,7 @@ abstract contract BaseAuctioneer is BaseHealthCheck, ReentrancyGuard {
* @param _from The address of the token to be auctioned.
* @return _auctionId The unique identifier of the enabled auction.
*/
function enable(address _from)
function enableAuction(address _from)
public
virtual
onlyManagement
Expand Down Expand Up @@ -365,8 +365,8 @@ abstract contract BaseAuctioneer is BaseHealthCheck, ReentrancyGuard {
* @dev Only callable by governance.
* @param _from The address of the token being sold.
*/
function disable(address _from) external virtual {
disable(_from, 0);
function disableAuction(address _from) external virtual {
disableAuction(_from, 0);
}

/**
Expand All @@ -375,7 +375,7 @@ abstract contract BaseAuctioneer is BaseHealthCheck, ReentrancyGuard {
* @param _from The address of the token being sold.
* @param _index The index the auctionId is at in the array.
*/
function disable(address _from, uint256 _index)
function disableAuction(address _from, uint256 _index)
public
virtual
onlyEmergencyAuthorized
Expand Down
6 changes: 3 additions & 3 deletions src/Bases/Auctioneer/IBaseAuctioneer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ interface IBaseAuctioneer is IBaseHealthCheck {
view
returns (uint256);

function enable(address _from) external returns (bytes32);
function enableAuction(address _from) external returns (bytes32);

function disable(address _from) external;
function disableAuction(address _from) external;

function disable(address _from, uint256 _index) external;
function disableAuction(address _from, uint256 _index) external;

function kick(bytes32 _auctionId) external returns (uint256 available);

Expand Down
16 changes: 8 additions & 8 deletions src/test/BaseAuctioneer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ contract BaseAuctioneerTest is Setup {

address from = tokenAddrs["WBTC"];

fromScaler = WAD / 10 ** ERC20(from).decimals();
wantScaler = WAD / 10 ** ERC20(asset).decimals();
fromScaler = WAD / 10**ERC20(from).decimals();
wantScaler = WAD / 10**ERC20(asset).decimals();

bytes32 id = auctioneer.enableAuction(from);

Expand Down Expand Up @@ -248,8 +248,8 @@ contract BaseAuctioneerTest is Setup {

address from = tokenAddrs["WBTC"];

fromScaler = WAD / 10 ** ERC20(from).decimals();
wantScaler = WAD / 10 ** ERC20(asset).decimals();
fromScaler = WAD / 10**ERC20(from).decimals();
wantScaler = WAD / 10**ERC20(asset).decimals();

bytes32 id = auctioneer.enableAuction(from);

Expand Down Expand Up @@ -301,8 +301,8 @@ contract BaseAuctioneerTest is Setup {

address from = tokenAddrs["WBTC"];

fromScaler = WAD / 10 ** ERC20(from).decimals();
wantScaler = WAD / 10 ** ERC20(asset).decimals();
fromScaler = WAD / 10**ERC20(from).decimals();
wantScaler = WAD / 10**ERC20(asset).decimals();

bytes32 id = auctioneer.enableAuction(from);

Expand Down Expand Up @@ -394,8 +394,8 @@ contract BaseAuctioneerTest is Setup {

address from = tokenAddrs["WBTC"];

fromScaler = WAD / 10 ** ERC20(from).decimals();
wantScaler = WAD / 10 ** ERC20(asset).decimals();
fromScaler = WAD / 10**ERC20(from).decimals();
wantScaler = WAD / 10**ERC20(asset).decimals();

bytes32 id = auctioneer.enableAuction(from);

Expand Down
7 changes: 6 additions & 1 deletion src/test/mocks/MockAuctioneer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ contract MockAuctioneer is BaseAuctioneer {
_totalAssets = asset.balanceOf(address(this));
}

function _kickable(address _token) internal view override returns (uint256) {
function _kickable(address _token)
internal
view
override
returns (uint256)
{
if (useDefault) return super._kickable(_token);
return letKick;
}
Expand Down

0 comments on commit 29c54b1

Please sign in to comment.