From 135fce9742204a6937d0c0d513a2eeaf20dedfaa Mon Sep 17 00:00:00 2001 From: CheyenneAtapour Date: Wed, 31 Jul 2024 16:18:38 -0700 Subject: [PATCH] fix: replace functions with constants --- src/test/TestGhoBase.t.sol | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/test/TestGhoBase.t.sol b/src/test/TestGhoBase.t.sol index 70a7ce3c..eebc4bfe 100644 --- a/src/test/TestGhoBase.t.sol +++ b/src/test/TestGhoBase.t.sol @@ -374,27 +374,29 @@ contract TestGhoBase is Test, Constants, Events { // Setup GHO Token Pool uint64 SOURCE_CHAIN_SELECTOR = 1; uint64 DEST_CHAIN_SELECTOR = 2; + RateLimiter.Config memory initialOutboundRateLimit = RateLimiter.Config({ + isEnabled: true, + capacity: 100e28, + rate: 1e15 + }); + RateLimiter.Config memory initialInboundRateLimit = RateLimiter.Config({ + isEnabled: true, + capacity: 222e30, + rate: 1e18 + }); UpgradeableTokenPool.ChainUpdate[] memory chainUpdate = new UpgradeableTokenPool.ChainUpdate[]( 1 ); chainUpdate[0] = UpgradeableTokenPool.ChainUpdate({ remoteChainSelector: DEST_CHAIN_SELECTOR, allowed: true, - outboundRateLimiterConfig: getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: getInboundRateLimiterConfig() + outboundRateLimiterConfig: initialOutboundRateLimit, + inboundRateLimiterConfig: initialInboundRateLimit }); vm.prank(OWNER); GHO_TOKEN_POOL.applyChainUpdates(chainUpdate); } - function getOutboundRateLimiterConfig() public pure returns (RateLimiter.Config memory) { - return RateLimiter.Config({isEnabled: true, capacity: 100e28, rate: 1e15}); - } - - function getInboundRateLimiterConfig() public pure returns (RateLimiter.Config memory) { - return RateLimiter.Config({isEnabled: true, capacity: 222e30, rate: 1e18}); - } - function ghoFaucet(address to, uint256 amount) public { vm.prank(FAUCET); GHO_TOKEN.mint(to, amount);