From c5298a1a9d410fa97115c3d4175013aabb61ebbc Mon Sep 17 00:00:00 2001 From: CheyenneAtapour Date: Wed, 24 Jul 2024 16:42:58 -0700 Subject: [PATCH] chore: prettier --- src/contracts/misc/ArbGhoSteward.sol | 8 ++------ src/contracts/misc/RiskCouncilControlled.sol | 4 ++-- src/contracts/misc/deps/Dependencies.sol | 15 +++++++++++---- src/contracts/misc/interfaces/IArbGhoSteward.sol | 2 +- src/contracts/misc/interfaces/IGhoStewardV2.sol | 2 +- src/test/TestArbGhoSteward.t.sol | 3 ++- src/test/TestGhoStewardV2.t.sol | 9 +++------ 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/contracts/misc/ArbGhoSteward.sol b/src/contracts/misc/ArbGhoSteward.sol index 86be63b7..4a5514c1 100644 --- a/src/contracts/misc/ArbGhoSteward.sol +++ b/src/contracts/misc/ArbGhoSteward.sol @@ -109,7 +109,7 @@ contract ArbGhoSteward is Ownable, IArbGhoSteward { function updateRateLimit( uint64 remoteChainSelector, bool outboundEnabled, - uint128 outboundCapacity, + uint128 outboundCapacity, uint128 outboundRate, bool inboundEnabled, uint128 inboundCapacity, @@ -122,11 +122,7 @@ contract ArbGhoSteward is Ownable, IArbGhoSteward { capacity: outboundCapacity, rate: outboundRate }), - RateLimiter.Config({ - isEnabled: inboundEnabled, - capacity: inboundCapacity, - rate: inboundRate - }) + RateLimiter.Config({isEnabled: inboundEnabled, capacity: inboundCapacity, rate: inboundRate}) ); } diff --git a/src/contracts/misc/RiskCouncilControlled.sol b/src/contracts/misc/RiskCouncilControlled.sol index 17f89890..4af7957b 100644 --- a/src/contracts/misc/RiskCouncilControlled.sol +++ b/src/contracts/misc/RiskCouncilControlled.sol @@ -8,7 +8,7 @@ contract RiskCouncilControlled { require(riskCouncil != address(0), 'INVALID_RISK_COUNCIL'); COUNCIL = riskCouncil; } - + /** * @dev Only Risk Council can call functions marked by this modifier. */ @@ -16,4 +16,4 @@ contract RiskCouncilControlled { require(COUNCIL == msg.sender, 'INVALID_CALLER'); _; } -} \ No newline at end of file +} diff --git a/src/contracts/misc/deps/Dependencies.sol b/src/contracts/misc/deps/Dependencies.sol index 82d6db5f..ca6c6a45 100644 --- a/src/contracts/misc/deps/Dependencies.sol +++ b/src/contracts/misc/deps/Dependencies.sol @@ -880,7 +880,6 @@ abstract contract UpgradeableBurnMintTokenPoolAbstract is UpgradeableTokenPool { } } - /// @notice Implements Token Bucket rate limiting. /// @dev uint128 is safe for rate limiter state. /// For USD value rate limiting, it can adequately store USD value in 18 decimals. @@ -1059,10 +1058,14 @@ library RateLimiter { /// - Implementation of Initializable to allow upgrades /// - Move of allowlist and router definition to initialization stage /// - Inclusion of rate limit admin who may configure rate limits in addition to owner -contract UpgradeableBurnMintTokenPool is Initializable, UpgradeableBurnMintTokenPoolAbstract, ITypeAndVersion { +contract UpgradeableBurnMintTokenPool is + Initializable, + UpgradeableBurnMintTokenPoolAbstract, + ITypeAndVersion +{ error Unauthorized(address caller); - string public constant override typeAndVersion = "BurnMintTokenPool 1.4.0"; + string public constant override typeAndVersion = 'BurnMintTokenPool 1.4.0'; /// @notice The address of the rate limiter admin. /// @dev Can be address(0) if none is configured. @@ -1084,7 +1087,11 @@ contract UpgradeableBurnMintTokenPool is Initializable, UpgradeableBurnMintToken /// @param owner The address of the owner /// @param allowlist A set of addresses allowed to trigger lockOrBurn as original senders /// @param router The address of the router - function initialize(address owner, address[] memory allowlist, address router) public virtual initializer { + function initialize( + address owner, + address[] memory allowlist, + address router + ) public virtual initializer { if (owner == address(0)) revert ZeroAddressNotAllowed(); if (router == address(0)) revert ZeroAddressNotAllowed(); _transferOwnership(owner); diff --git a/src/contracts/misc/interfaces/IArbGhoSteward.sol b/src/contracts/misc/interfaces/IArbGhoSteward.sol index 38485267..cd2cef3a 100644 --- a/src/contracts/misc/interfaces/IArbGhoSteward.sol +++ b/src/contracts/misc/interfaces/IArbGhoSteward.sol @@ -33,7 +33,7 @@ interface IArbGhoSteward { function updateRateLimit( uint64 remoteChainSelector, bool outboundEnabled, - uint128 outboundCapacity, + uint128 outboundCapacity, uint128 outboundRate, bool inboundEnabled, uint128 inboundCapacity, diff --git a/src/contracts/misc/interfaces/IGhoStewardV2.sol b/src/contracts/misc/interfaces/IGhoStewardV2.sol index 6b495f5a..deda76f7 100644 --- a/src/contracts/misc/interfaces/IGhoStewardV2.sol +++ b/src/contracts/misc/interfaces/IGhoStewardV2.sol @@ -91,7 +91,7 @@ interface IGhoStewardV2 { function updateRateLimit( uint64 remoteChainSelector, bool outboundEnabled, - uint128 outboundCapacity, + uint128 outboundCapacity, uint128 outboundRate, bool inboundEnabled, uint128 inboundCapacity, diff --git a/src/test/TestArbGhoSteward.t.sol b/src/test/TestArbGhoSteward.t.sol index 1cfa57d1..10db720c 100644 --- a/src/test/TestArbGhoSteward.t.sol +++ b/src/test/TestArbGhoSteward.t.sol @@ -7,7 +7,8 @@ import {RateLimiter} from 'src/contracts/misc/deps/Dependencies.sol'; contract TestArbGhoSteward is TestGhoBase { using ReserveConfiguration for DataTypes.ReserveConfigurationMap; - RateLimiter.Config rateLimitConfig = RateLimiter.Config({isEnabled: true, capacity: type(uint128).max, rate: 1e15}); + RateLimiter.Config rateLimitConfig = + RateLimiter.Config({isEnabled: true, capacity: type(uint128).max, rate: 1e15}); event ChainConfigured( uint64 remoteChainSelector, diff --git a/src/test/TestGhoStewardV2.t.sol b/src/test/TestGhoStewardV2.t.sol index 014107de..0d6cea85 100644 --- a/src/test/TestGhoStewardV2.t.sol +++ b/src/test/TestGhoStewardV2.t.sol @@ -7,7 +7,8 @@ import {RateLimiter} from '../contracts/misc/deps/Dependencies.sol'; contract TestGhoStewardV2 is TestGhoBase { using ReserveConfiguration for DataTypes.ReserveConfigurationMap; - RateLimiter.Config rateLimitConfig = RateLimiter.Config({isEnabled: true, capacity: type(uint128).max, rate: 1e15}); + RateLimiter.Config rateLimitConfig = + RateLimiter.Config({isEnabled: true, capacity: type(uint128).max, rate: 1e15}); event ChainConfigured( uint64 remoteChainSelector, @@ -863,11 +864,7 @@ contract TestGhoStewardV2 is TestGhoBase { function testUpdateRateLimit() public { vm.expectEmit(false, false, false, true); - emit ChainConfigured( - 2, - rateLimitConfig, - rateLimitConfig - ); + emit ChainConfigured(2, rateLimitConfig, rateLimitConfig); vm.prank(RISK_COUNCIL); GHO_STEWARD_V2.updateRateLimit( 2,