Skip to content

Commit

Permalink
feat: fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bowd committed Feb 19, 2024
1 parent 9934a22 commit 964effc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contracts/governance/Emission.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { MentoToken } from "./MentoToken.sol";
*/
contract Emission is OwnableUpgradeable {
/// @notice The max amount that will be minted through emission
uint256 public constant TOTAL_EMISSION_SUPPLY = 650_000_000 * 10 ** 18;
uint256 public constant TOTAL_EMISSION_SUPPLY = 650_000_000 * 10**18;

/// @notice Pre-calculated constant = EMISSION_HALF_LIFE / LN2.
uint256 public constant A = 454968308;
Expand Down
6 changes: 5 additions & 1 deletion contracts/oracles/BreakerBox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ contract BreakerBox is IBreakerBox, Ownable {
* @param enable Boolean indicating whether the breaker should be
* enabled or disabled for the given rateFeed.
*/
function toggleBreaker(address breakerAddress, address rateFeedID, bool enable) public onlyOwner {
function toggleBreaker(
address breakerAddress,
address rateFeedID,
bool enable
) public onlyOwner {
require(rateFeedStatus[rateFeedID], "Rate feed ID has not been added");
require(isBreaker(breakerAddress), "This breaker has not been added to the BreakerBox");
require(rateFeedBreakerStatus[rateFeedID][breakerAddress].enabled != enable, "Breaker is already in this state");
Expand Down
20 changes: 12 additions & 8 deletions contracts/swap/BiPoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ contract BiPoolManager is IExchangeProvider, IBiPoolManager, Initializable, Owna
require(asset0Decimals <= 18, "asset0 decimals must be <= 18");
require(asset1Decimals <= 18, "asset1 decimals must be <= 18");

tokenPrecisionMultipliers[exchange.asset0] = 10 ** (18 - uint256(asset0Decimals));
tokenPrecisionMultipliers[exchange.asset1] = 10 ** (18 - uint256(asset1Decimals));
tokenPrecisionMultipliers[exchange.asset0] = 10**(18 - uint256(asset0Decimals));
tokenPrecisionMultipliers[exchange.asset1] = 10**(18 - uint256(asset1Decimals));

exchanges[exchangeId] = exchange;
// slither-disable-next-line controlled-array-length
Expand Down Expand Up @@ -490,9 +490,11 @@ contract BiPoolManager is IExchangeProvider, IBiPoolManager, Initializable, Owna
* @param exchange The exchange being updated.
* @return exchangeAfter The updated exchange.
*/
function updateBucketsIfNecessary(
PoolExchange memory exchange
) internal view returns (PoolExchange memory, bool updated) {
function updateBucketsIfNecessary(PoolExchange memory exchange)
internal
view
returns (PoolExchange memory, bool updated)
{
if (shouldUpdateBuckets(exchange)) {
(exchange.bucket0, exchange.bucket1) = getUpdatedBuckets(exchange);
updated = true;
Expand Down Expand Up @@ -555,9 +557,11 @@ contract BiPoolManager is IExchangeProvider, IBiPoolManager, Initializable, Owna
* @return rateNumerator
* @return rateDenominator
*/
function getOracleExchangeRate(
address target
) internal view returns (uint256 rateNumerator, uint256 rateDenominator) {
function getOracleExchangeRate(address target)
internal
view
returns (uint256 rateNumerator, uint256 rateDenominator)
{
(rateNumerator, rateDenominator) = sortedOracles.medianRate(target);
require(rateDenominator > 0, "exchange rate denominator must be greater than 0");
}
Expand Down
26 changes: 20 additions & 6 deletions contracts/swap/Reserve.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,16 @@ contract Reserve is IReserve, ICeloVersionedContract, Ownable, Initializable, Us
* @return Minor version of the contract.
* @return Patch version of the contract.
*/
function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) {
function getVersionNumber()
external
pure
returns (
uint256,
uint256,
uint256,
uint256
)
{
return (2, 1, 0, 0);
}

Expand Down Expand Up @@ -446,7 +455,11 @@ contract Reserve is IReserve, ICeloVersionedContract, Ownable, Initializable, Us
* @param value The amount of collateral assets to transfer.
* @return Returns true if the transaction succeeds.
*/
function transferCollateralAsset(address collateralAsset, address payable to, uint256 value) external returns (bool) {
function transferCollateralAsset(
address collateralAsset,
address payable to,
uint256 value
) external returns (bool) {
require(isSpender[msg.sender], "sender not allowed to transfer Reserve funds");
require(isOtherReserveAddress[to], "can only transfer to other reserve address");
require(
Expand Down Expand Up @@ -525,10 +538,11 @@ contract Reserve is IReserve, ICeloVersionedContract, Ownable, Initializable, Us
* @param value The amount of gold to transfer.
* @return Returns true if the transaction succeeds.
*/
function transferExchangeGold(
address payable to,
uint256 value
) external isAllowedToSpendExchange(msg.sender) returns (bool) {
function transferExchangeGold(address payable to, uint256 value)
external
isAllowedToSpendExchange(msg.sender)
returns (bool)
{
return _transferGold(to, value);
}

Expand Down

0 comments on commit 964effc

Please sign in to comment.