Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Submodfix #71

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions contracts/test/GlobalPauser.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract GlobalPauserTest is BaseTest {
pauser.pauseAll();
}

function testPauseAllMode() public debuggingOnly forkAtBlock(MODE_MAINNET, 9269895) {
function testPauseAll() public debuggingOnly forkAtBlock(MODE_MAINNET, 9269895) {
(, PoolDirectory.Pool[] memory pools) = PoolDirectory(poolDirectory).getActivePools();
for (uint256 i = 0; i < pools.length; i++) {
ICErc20[] memory markets = IonicComptroller(pools[i].comptroller).getAllMarkets();
Expand All @@ -59,30 +59,4 @@ contract GlobalPauserTest is BaseTest {
}
}
}

function testPauseAllBase() public debuggingOnly forkAtBlock(BASE_MAINNET, 15970403) {
address _poolDirectory = 0xE1A3006be645a80F206311d9f18C866c204bA02f;
pauser = GlobalPauser(0x48F0F46F56C2Ca5def59fd673fF69495b7272Eb0);
(, PoolDirectory.Pool[] memory pools) = PoolDirectory(_poolDirectory).getActivePools();
for (uint256 i = 0; i < pools.length; i++) {
ICErc20[] memory markets = IonicComptroller(pools[i].comptroller).getAllMarkets();
for (uint256 j = 0; j < markets.length; j++) {
bool isPaused = IonicComptroller(pools[i].comptroller).borrowGuardianPaused(address(markets[j]));
assertEq(isPaused, false);
isPaused = IonicComptroller(pools[i].comptroller).mintGuardianPaused(address(markets[j]));
assertEq(isPaused, false);
}
}
vm.prank(pauseGuardian);
pauser.pauseAll();
for (uint256 i = 0; i < pools.length; i++) {
ICErc20[] memory markets = IonicComptroller(pools[i].comptroller).getAllMarkets();
for (uint256 j = 0; j < markets.length; j++) {
bool isPaused = IonicComptroller(pools[i].comptroller).borrowGuardianPaused(address(markets[j]));
assertEq(isPaused, true);
isPaused = IonicComptroller(pools[i].comptroller).mintGuardianPaused(address(markets[j]));
assertEq(isPaused, true);
}
}
}
}
1 change: 0 additions & 1 deletion contracts/test/config/BaseTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ abstract contract BaseTest is Test {
uint128 constant LINEA_MAINNET = 59144;
uint128 constant ZKEVM_MAINNET = 1101;
uint128 constant MODE_MAINNET = 34443;
uint128 constant BASE_MAINNET = 8453;

// taken from ERC1967Upgrade
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
Expand Down
1 change: 0 additions & 1 deletion lib/pyth-neon
Submodule pyth-neon deleted from 7b4564
Loading