Skip to content

Commit

Permalink
Merge branch 'master' into hrikb/pendleV2-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
HrikB authored May 17, 2024
2 parents 2f0834d + 6690e94 commit f78ad20
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 264 deletions.
17 changes: 5 additions & 12 deletions echidna-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
workers: 1
testLimit: 50000
seqLen: 1024
seqLen: 100

codeSize: 0x9000

Expand All @@ -21,7 +21,9 @@ cryticArgs: [
erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/
forge-std/=lib/forge-std/src/
openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/
openzeppelin-contracts/=lib/openzeppelin-contracts/",
openzeppelin-contracts/=lib/openzeppelin-contracts/
solady/=lib/solady/
solarray/=lib/solarray/src/",
]

prefix: "invariant_"
Expand All @@ -33,13 +35,4 @@ corpusDir: echidna-corpus
allContracts: false
filterBlacklist: false # if false, allows filterFunctions
filterFunctions:
[
"IonPool_Echidna.supply(uint8,uint88,uint48)",
"IonPool_Echidna.withdraw(uint8,uint88,uint48)",
"IonPool_Echidna.borrow(uint8,uint8,uint128,uint48)",
"IonPool_Echidna.repay(uint8,uint8,uint128,uint48)",
"IonPool_Echidna.depositCollateral(uint8,uint8,uint128,uint48)",
"IonPool_Echidna.withdrawCollateral(uint8,uint8,uint128,uint48)",
"IonPool_Echidna.gemJoin(uint8,uint8,uint128,uint48)",
"IonPool_Echidna.gemExit(uint8,uint8,uint128,uint48)",
]
["IonPool_Echidna.fuzzedFallback(uint128,uint128,uint128,uint128,uint256)"]
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ max_test_rejects = 655360

[profile.default.invariant]
runs = 20
depth = 1536
depth = 100
fail_on_revert = true
call_override = false # reentrancy-check
preserve_state = true
Expand Down
6 changes: 0 additions & 6 deletions test/helpers/BaseTestSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,5 @@ abstract contract BaseTestSetup is Test {

function setUp() public virtual {
underlying = new ERC20PresetMinterPauser("WETH", "Wrapped Ether");
if (address(WETH_ADDRESS).code.length == 0) {
vm.etch(address(WETH_ADDRESS), address(underlying).code);
underlying = ERC20PresetMinterPauser(address(WETH_ADDRESS));
underlying.grantRole(underlying.MINTER_ROLE(), address(this));
underlying.grantRole(underlying.DEFAULT_ADMIN_ROLE(), address(this));
}
}
}
43 changes: 11 additions & 32 deletions test/invariant/IonPool/IonPoolEchidna.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,15 @@ contract IonPool_Echidna is IonPool_InvariantTest {
_setUp(false, false);
}

// function supply(uint8 index, uint88 amount, uint48 warpTimeAmount) external {
// actorManager.supply(index, amount, warpTimeAmount);
// }

// function withdraw(uint8 index, uint88 amount, uint48 warpTimeAmount) external {
// actorManager.withdraw(index, amount, warpTimeAmount);
// }

// function borrow(uint8 borrowerIndex, uint8 ilkIndex, uint128 amount, uint48 warpTimeAmount) external {
// actorManager.borrow(borrowerIndex, ilkIndex, amount, warpTimeAmount);
// }

// function repay(uint8 borrowerIndex, uint8 ilkIndex, uint128 amount, uint48 warpTimeAmount) external {
// actorManager.repay(borrowerIndex, ilkIndex, amount, warpTimeAmount);
// }

// function depositCollateral(uint8 borrowerIndex, uint8 ilkIndex, uint128 amount, uint48 warpTimeAmount) external {
// actorManager.depositCollateral(borrowerIndex, ilkIndex, amount, warpTimeAmount);
// }

// function withdrawCollateral(uint8 borrowerIndex, uint8 ilkIndex, uint128 amount, uint48 warpTimeAmount) external
// {
// actorManager.withdrawCollateral(borrowerIndex, ilkIndex, amount, warpTimeAmount);
// }

// function gemJoin(uint8 borrowerIndex, uint8 ilkIndex, uint128 amount, uint48 warpTimeAmount) external {
// actorManager.gemJoin(borrowerIndex, ilkIndex, amount, warpTimeAmount);
// }

// function gemExit(uint8 borrowerIndex, uint8 ilkIndex, uint128 amount, uint48 warpTimeAmount) external {
// actorManager.gemExit(borrowerIndex, ilkIndex, amount, warpTimeAmount);
// }
function fuzzedFallback(
uint128 userIndex,
uint128 ilkIndex,
uint128 amount,
uint128 warpTimeAmount,
uint256 functionIndex
)
public
{
actorManager.fuzzedFallback(userIndex, ilkIndex, amount, warpTimeAmount, functionIndex);
}
}
105 changes: 0 additions & 105 deletions test/unit/concrete/SwEthHandler.t.sol

This file was deleted.

108 changes: 0 additions & 108 deletions test/unit/concrete/WstEthHandler.t.sol

This file was deleted.

0 comments on commit f78ad20

Please sign in to comment.