Skip to content

Commit

Permalink
test: add fork tests (#416)
Browse files Browse the repository at this point in the history
* test: role setup

* test: add basic fork tests

* fix: requested changes

* fix: use aave address book

* fix: Update aave address book dep

* test: Add arbitrum tests

* test: Add rate limit tests

* test: Add gho borrow rate tests

* fix: Use appropriate controlled facilitator

* fix: remove unused import

* fix: Add arbitrum env var to ci

---------

Co-authored-by: miguelmtzinf <[email protected]>
  • Loading branch information
CheyenneAtapour and miguelmtzinf authored Sep 12, 2024
1 parent fe72684 commit 4e645f6
Show file tree
Hide file tree
Showing 10 changed files with 818 additions and 88 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
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
3 changes: 1 addition & 2 deletions src/test/TestGhoBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ 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';
Expand Down Expand Up @@ -80,7 +79,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 4e645f6

Please sign in to comment.