Skip to content

Commit

Permalink
Merge branch 'remove-rewards-mgr' of github.com:ajna-finance/contract…
Browse files Browse the repository at this point in the history
…s into remove-rewards-mgr
  • Loading branch information
EdNoepel committed Dec 18, 2023
2 parents c541940 + 50e2343 commit 553655a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
9 changes: 1 addition & 8 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,11 @@ Invariant test scenarios can be externally configured by customizing following e
| MAX_POOL_DEBT | ERC20 ERC721 | 1e45 | The max amount of debt that can be taken from the pool. If debt goes above this amount, borrower debt will be repaid |
| SKIP_TIME | ERC20 ERC721 | 24 hours | The upper limit of time that can be skipped after a pool action (fuzzed) |
| SKIP_TIME_TO_KICK | ERC20 ERC721 | 200 days | The time to be skipped and drive a new loan undercollateralized. Use a big value to ensure a successful kick |
| MAX_EPOCH_ADVANCE | ERC20 ERC721 | 5 | The maximum number of epochs that will be created before an unstake call |
| MAX_AJNA_AMOUNT | ERC20 ERC721 | 100_000_000 | The maximum amount of ajna provided to the rewards contract |
| NO_OF_POOLS | Position Rewards | 10 | Number of pools to be used in position and rewards manager invariant testing |
| NO_OF_POOLS | Position | 10 | Number of pools to be used in position manager invariant testing |
| FOUNDRY_INVARIANT_RUNS | ERC20 ERC721 | 10 | The number of runs for each scenario |
| FOUNDRY_INVARIANT_DEPTH | ERC20 ERC721 | 200 | The number of actions performed in each scenario |
| LOGS_VERBOSITY_POOL | ERC20 ERC721 | 0 | <p> Details to log <p> 0 = No Logs <p> 1 = pool State <p> 2 = pool State, Auctions details <p> 3 = pool State, Auctions details , Buckets details <p> 4 = pool State, Auctions details , Buckets details, Lender details <p> 5 = pool State, Auctions details , Buckets details, Lender details, Borrower details <p> Note - Log File with name `logFile.txt` will be generated in project directory|
| LOGS_VERBOSITY_POSITION | ERC20 ERC721 | 0 | <p> Details to log <p> 0 = No Logs <p> 1 = positionManager details <p> Note - Log File with name `logFile.txt` will be generated in project directory|
| LOGS_VERBOSITY_REWARDS | ERC20 ERC721 | 0 | <p> Details to log <p> 0 = No Logs <p> 1 = rewardsManager details <p> Note - Log File with name `logFile.txt` will be generated in project directory|
#### Invariant names

The `<invariant_name>` placeholder in commands below could take following values:
Expand Down Expand Up @@ -155,10 +152,6 @@ make test-invariant-position-erc20
```bash
make test-invariant-position-erc721
```
- run all invariant tests for Rewards Manager:
```bash
make test-invariant-rewards
```
- run specific invariant test for both ERC20 and ERC721 pools:
```bash
make test-invariant MT=<invariant_name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ abstract contract UnboundedBasePositionHandler is Test {

bytes32 internal _poolHash;

uint256 MAX_AJNA_AMOUNT = vm.envOr("MAX_AJNA_AMOUNT_ERC20", uint256(100_000_000 * 1e18));

address[] internal _pools;

// positionManager
Expand Down
2 changes: 0 additions & 2 deletions tests/forge/invariants/base/BasicInvariants.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,6 @@ abstract contract BasicInvariants is BaseInvariants {
IBaseHandler(_handler).numberOfCalls("BLiquidationHandler.settleAuction") +
IBaseHandler(_handler).numberOfCalls("BReserveHandler.takeReserves") +
IBaseHandler(_handler).numberOfCalls("BReserveHandler.kickReserves") +
IBaseHandler(_handler).numberOfCalls("BRewardsHandler.stake") +
IBaseHandler(_handler).numberOfCalls("BRewardsHandler.unstake") +
IBaseHandler(_handler).numberOfCalls("BPositionHandler.mint") +
IBaseHandler(_handler).numberOfCalls("BPositionHandler.burn") +
IBaseHandler(_handler).numberOfCalls("BPositionHandler.memorialize") +
Expand Down

0 comments on commit 553655a

Please sign in to comment.