Skip to content

Commit

Permalink
Merge branch 'feat/ccip-extension' into certora
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMorami committed Sep 15, 2024
2 parents 4a996cf + c82c63b commit cccc1b8
Show file tree
Hide file tree
Showing 18 changed files with 853 additions and 111 deletions.
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
ALCHEMY_KEY: '${{secrets.ALCHEMY_KEY}}'
ETH_RPC_URL: 'https://eth-mainnet.g.alchemy.com/v2/${{secrets.ALCHEMY_KEY}}'
RPC_MAINNET: 'https://eth-mainnet.g.alchemy.com/v2/${{secrets.ALCHEMY_KEY}}'
RPC_ARBITRUM: 'https://arb-mainnet.g.alchemy.com/v2/${{secrets.ALCHEMY_KEY}}'
strategy:
matrix:
node-version:
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ optimizer_runs = 200

[rpc_endpoints]
mainnet = "${RPC_MAINNET}"
arbitrum = "${RPC_ARBITRUM}"

# See more config options https://github.com/foundry-rs/foundry/tree/master/config
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 577 files
4 changes: 2 additions & 2 deletions src/contracts/misc/GhoAaveSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {IPoolAddressesProvider} from '@aave/core-v3/contracts/interfaces/IPoolAd
import {IPool} from '@aave/core-v3/contracts/interfaces/IPool.sol';
import {DataTypes} from '@aave/core-v3/contracts/protocol/libraries/types/DataTypes.sol';
import {ReserveConfiguration} from '@aave/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {IPoolConfigurator, IDefaultInterestRateStrategyV2, DefaultReserveInterestRateStrategyV2} from './dependencies/AaveV3-1.sol';
import {IPoolConfigurator, IDefaultInterestRateStrategyV2} from './dependencies/AaveV3-1.sol';
import {IGhoAaveSteward} from './interfaces/IGhoAaveSteward.sol';
import {RiskCouncilControlled} from './RiskCouncilControlled.sol';

Expand All @@ -30,7 +30,7 @@ contract GhoAaveSteward is Ownable, RiskCouncilControlled, IGhoAaveSteward {
address public immutable POOL_DATA_PROVIDER;

/// @inheritdoc IGhoAaveSteward
uint256 public constant MINIMUM_DELAY = 2 days;
uint256 public constant MINIMUM_DELAY = 1 days;

/// @inheritdoc IGhoAaveSteward
address public immutable POOL_ADDRESSES_PROVIDER;
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/misc/GhoBucketSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract GhoBucketSteward is Ownable, RiskCouncilControlled, IGhoBucketSteward {
using EnumerableSet for EnumerableSet.AddressSet;

/// @inheritdoc IGhoBucketSteward
uint256 public constant MINIMUM_DELAY = 2 days;
uint256 public constant MINIMUM_DELAY = 1 days;

/// @inheritdoc IGhoBucketSteward
address public immutable GHO_TOKEN;
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/misc/GhoCcipSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {RiskCouncilControlled} from './RiskCouncilControlled.sol';
*/
contract GhoCcipSteward is RiskCouncilControlled, IGhoCcipSteward {
/// @inheritdoc IGhoCcipSteward
uint256 public constant MINIMUM_DELAY = 2 days;
uint256 public constant MINIMUM_DELAY = 1 days;

/// @inheritdoc IGhoCcipSteward
address public immutable GHO_TOKEN;
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/misc/GhoGsmSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract GhoGsmSteward is RiskCouncilControlled, IGhoGsmSteward {
uint256 public constant GSM_FEE_RATE_CHANGE_MAX = 0.0050e4; // 0.50%

/// @inheritdoc IGhoGsmSteward
uint256 public constant MINIMUM_DELAY = 2 days;
uint256 public constant MINIMUM_DELAY = 1 days;

/// @inheritdoc IGhoGsmSteward
address public immutable FIXED_FEE_STRATEGY_FACTORY;
Expand Down
8 changes: 8 additions & 0 deletions src/contracts/misc/dependencies/Ccip.sol
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ interface IUpgradeableLockReleaseTokenPool {
RateLimiter.Config memory inboundConfig
) external;

function setRateLimitAdmin(address rateLimitAdmin) external;

function setBridgeLimitAdmin(address bridgeLimitAdmin) external;

function getRateLimitAdmin() external view returns (address);

function getBridgeLimitAdmin() external view returns (address);

function getBridgeLimit() external view returns (uint256);

function getCurrentOutboundRateLimiterState(
Expand Down
9 changes: 3 additions & 6 deletions src/test/TestGhoAaveSteward.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ contract TestGhoAaveSteward is TestGhoBase {

IGhoAaveSteward.BorrowRateConfig public defaultBorrowRateConfig =
IGhoAaveSteward.BorrowRateConfig({
optimalUsageRatioMaxChange: 10_00,
optimalUsageRatioMaxChange: 5_00,
baseVariableBorrowRateMaxChange: 5_00,
variableRateSlope1MaxChange: 10_00,
variableRateSlope2MaxChange: 10_00
variableRateSlope1MaxChange: 5_00,
variableRateSlope2MaxChange: 5_00
});
IDefaultInterestRateStrategyV2.InterestRateData public defaultRateParams =
IDefaultInterestRateStrategyV2.InterestRateData({
Expand Down Expand Up @@ -661,9 +661,6 @@ contract TestGhoAaveSteward is TestGhoBase {
}

function testRevertUpdateGhoBorrowRateIfValueMoreThanMax() public {
address currentInterestRateStrategy = POOL.getReserveInterestRateStrategyAddress(
address(GHO_TOKEN)
);
uint32 maxGhoBorrowRate = GHO_BORROW_RATE_MAX;
_setGhoBorrowRateViaConfigurator(maxGhoBorrowRate);
vm.prank(RISK_COUNCIL);
Expand Down
4 changes: 1 addition & 3 deletions src/test/TestGhoBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,13 @@ import {IGhoVariableDebtTokenTransferHook} from 'aave-stk-v1-5/src/interfaces/IG
import {IPool} from '@aave/core-v3/contracts/interfaces/IPool.sol';
import {IPoolAddressesProvider} from '@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol';
import {IStakedAaveV3} from 'aave-stk-v1-5/src/interfaces/IStakedAaveV3.sol';
import {IFixedRateStrategyFactory} from '../contracts/facilitators/aave/interestStrategy/interfaces/IFixedRateStrategyFactory.sol';

// non-GHO contracts
import {AdminUpgradeabilityProxy} from '@aave/core-v3/contracts/dependencies/openzeppelin/upgradeability/AdminUpgradeabilityProxy.sol';
import {ERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/ERC20.sol';
import {StakedAaveV3} from 'aave-stk-v1-5/src/contracts/StakedAaveV3.sol';
import {ReserveConfiguration} from '@aave/core-v3/contracts/protocol/libraries/configuration/ReserveConfiguration.sol';
import {TransparentUpgradeableProxy} from 'solidity-utils/contracts/transparent-proxy/TransparentUpgradeableProxy.sol';
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';

// GHO contracts
import {GhoAToken} from '../contracts/facilitators/aave/tokens/GhoAToken.sol';
Expand Down Expand Up @@ -80,7 +78,7 @@ import {SampleSwapFreezer} from '../contracts/facilitators/gsm/misc/SampleSwapFr
import {GsmRegistry} from '../contracts/facilitators/gsm/misc/GsmRegistry.sol';
import {IGhoGsmSteward} from '../contracts/misc/interfaces/IGhoGsmSteward.sol';
import {GhoGsmSteward} from '../contracts/misc/GhoGsmSteward.sol';
import {FixedFeeStrategyFactory} from 'src/contracts/facilitators/gsm/feeStrategy/FixedFeeStrategyFactory.sol';
import {FixedFeeStrategyFactory} from '../contracts/facilitators/gsm/feeStrategy/FixedFeeStrategyFactory.sol';

// CCIP contracts
import {MockUpgradeableLockReleaseTokenPool} from './mocks/MockUpgradeableLockReleaseTokenPool.sol';
Expand Down
2 changes: 1 addition & 1 deletion src/test/TestGhoCcipSteward.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.0;

import './TestGhoBase.t.sol';
import {RateLimiter} from 'src/contracts/misc/dependencies/Ccip.sol';
import {RateLimiter} from '../contracts/misc/dependencies/Ccip.sol';

contract TestGhoCcipSteward is TestGhoBase {
RateLimiter.Config rateLimitConfig =
Expand Down
84 changes: 0 additions & 84 deletions src/test/TestGhoStewards.t.sol

This file was deleted.

Loading

0 comments on commit cccc1b8

Please sign in to comment.