Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/fluid strategy #70

Merged
merged 49 commits into from
Dec 16, 2024
Merged

Test/fluid strategy #70

merged 49 commits into from
Dec 16, 2024

Conversation

bayou020
Copy link
Collaborator

This pull request includes several changes to configuration files and updates to dependencies. The most important changes include adding RPC endpoints, updating the coverage command, and modifying the fork setup in tests.

Configuration updates:

Dependency updates:

  • package.json: Updated husky to version 9.1.7 and solhint to version 5.0.3.

Coverage command improvements:

  • package.json: Enhanced the forge-coverage command to include branch coverage and function end line derivation.

Test setup improvements:

  • test/utils/BaseTest.sol: Modified the setArbitrumFork function to use createSelectFork with a block number parameter for more control over the fork setup.

Copy link
Contributor

@YashP16 YashP16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases look good

foundry.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@YashP16 YashP16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coverage looks good

foundry.toml Show resolved Hide resolved
@YashP16 YashP16 merged commit 396989c into feat/fluidStrategy Dec 16, 2024
1 check passed
@YashP16 YashP16 deleted the test/fluidStrategy branch December 16, 2024 10:23
YashP16 added a commit that referenced this pull request Dec 20, 2024
* feat(Fluid strategy): Added base functions without implementation and initialize function

* feat(FluidStrategy): Implemented deposit and withdraw functionality

* Removed setting p token in initialization

* Added setPTokenAddress functionality

* fix(_abstractSetPToken): Error in if condition fixed

* Added validations and updated event

* Used redeem instead of withdraw and previewWithdraw instead of convertToShares

* Implemented all the remaining functionalities

* refactor(Strategy): Added error message and documentation

* perf(Strategy deposit and withdraw): Implemented stricter checks

* Removed unused functions from interface

* perf(strategy): Removed named returns

* Removed temp variable maxDeposit

* Update contracts/strategies/fluid/FluidStrategy.sol

Co-authored-by: Parv Garg <[email protected]>

* refactor(Fluid token interface): changed the name

* fix(deposit): Added post slippage check

* feat(Deposit and Withdraw): Added slippage checks

* Added deployment config for fluid strategy

* Test/fluid strategy (#70)

* Added base test script and setup

* Updated interface

* Added a sample test

* Fixed the precision error

* Removed unused functions from the interface

* fix(package): update forge-coverage script and dependencies

* feat(config): add RPC endpoint for Arbitrum and ensure cache path is defined

* fix(test): simplify Arbitrum fork setup by combining creation and selection

* Test(FluidStrategy): 93.2% of lines, 100% of the functions covered

* fix(test): format spacing in FluidStrategy test for consistency

* fix(test): improve test coverage for FluidStrategy by adding missing cases

* fix(test): rename variables for clarity and improve revert messages in FluidStrategy tests

* fix(test): rename test function for clarity in FluidStrategy tests

* Fixed aave strategy's test cases

* Revert "Fixed aave strategy's test cases"

This reverts commit b55f300.

* Fixed test case to support interface name change

* Fixed failing test cases

* Fixed failing test case (testFuzz_deposit)

* Revert "Fixed failing test case (testFuzz_deposit)"

This reverts commit 4932bc6.

* Updated slippage and it's comment to 4%

* Added test for the new condition in deposit

* feat(Deposit and Withdraw): Added slippage checks

* Revert "feat(Deposit and Withdraw): Added slippage checks"

This reverts commit 93dbc96.

* Fixed failing test

* Reverted the change to create fork

* test(FluidStrategy): Enhance tests for deposit and withdrawal slippage handling

* test(WithdrawTest): Fix formatting and enhance revert checks for withdrawal scenarios

* Added back createSelectFork function

* fix(package.json): update forge-coverage script to handle additional ignore errors

* docs(foundry.toml): Added comment for explicit evm version declaration

* feat(BaseTest): add COLLATERAL_MANAGER address to contract initialization

* feat(FluidStrategyTest): implement collateral strategy allocation and allocate from vault to strategy

* chore(.gitignore): add gambit_out for mutation testing and ensure .DS_Store is ignored

* refactor(FluidStrategyTest): reorganize tests, update withdraw slippage, and enhance allocation logic

* Added simulation script for fluid strategy

* Fixed forking issue

* chore(.gitignore): add testLogs to ignore list for cleaner mutation testing output

* fix(foundry.toml): remove unused rpc_endpoints section

* fix(foundry.toml): add rpc_endpoints section for Arbitrum

---------

Co-authored-by: [email protected] <[email protected]>

* feat(deployment): Add deployment configuration for fluid strategy

* feat(FluidStrategy): Add FLUID_STRATEGY constant and update withdrawal logic in tests

---------

Co-authored-by: Parv Garg <[email protected]>
Co-authored-by: Dayaa <[email protected]>
Co-authored-by: Yash Pitroda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants