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: increase test coverage on Liquidator #79

Merged
merged 9 commits into from
Nov 21, 2022
Merged

Conversation

doncesarts
Copy link
Contributor

@doncesarts doncesarts commented Nov 16, 2022

  • Increase test coverage on Liquidator
  • Increase test coverage on ImmutableModule
  • Increase test coverage on InitializableReentrancyGuard
  • Increase test coverage on Curve3CrvMetapoolCalculatorLibrary
  • Removed modules not used by metavaults from ImmutableModule
  • Added updateAssetPerShare and chargePerformanceFee to fork tests

@doncesarts doncesarts marked this pull request as ready for review November 17, 2022 08:53
Copy link
Contributor

@naddison36 naddison36 left a comment

Choose a reason for hiding this comment

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

Great work

@@ -27,7 +27,7 @@ struct Liquidation {
* @dev VERSION: 1.0
* DATE: 2022-05-11
*/
contract Liquidator is Initializable, ImmutableModule, InitializableReentrancyGuard {
contract Liquidator is Initializable, ImmutableModule, InitializableReentrancyGuard, ILiquidatorV2 {
Copy link
Contributor

Choose a reason for hiding this comment

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

good idea

@@ -776,6 +776,9 @@ abstract contract Curve3CrvAbstractMetaVault is AbstractSlippage, LightAbstractV
/// @dev Approves Curve's 3Pool contract to transfer assets (DAI, USDC or USDT) from this vault.
/// Also approves the underlying Meta Vault to transfer 3Crv from this vault.
function _resetAllowances() internal {
_asset.safeApprove(address(Curve3PoolCalculatorLibrary.THREE_POOL), 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

good pickup

@naddison36 naddison36 merged commit 87afe25 into develop Nov 21, 2022
@naddison36 naddison36 deleted the issue/test-coverage branch November 21, 2022 04:40
naddison36 added a commit that referenced this pull request Nov 21, 2022
* feat: Added afterRemoveVault hook and updateAssestsPerShare after vault is removed

* feat: test for update assetsPerShare after removal of underlyingVault

* Hardhat tasks to snap vault data (#72)

* chore: small update to vault deposit and mint HH tasks
* chore: removed links to missing FraxBP diagrams

* feat: added convex-3crv-snap HH task
chore: added assets in underlying vaults to convex-3crv-mv-snap HH task

* chore: test to get data for a worked sandwich attack on a Convex 3Crv vault

* chore: added collected fees to vault snaps

* chore: added worked Curve Metapools example for article

* Docs and fork tests (#73)

* chore: added process diagram for chargePerformanceFee

* chore: README updated

* chore: fork test donation of USDT and DAI

* chore: Added maxFee protection to liq-init-swap HH task
chore: better reporting of rewards in liq-collect-rewards HH task

* chore: add gas price to liq-init-swap HH task

* chore: HH task liq-donate-tokens further parameterized

* Fix to charge performance fee (#75)

* chore: Updated HH task convex-3crv-snap

* chore: added stored assets/share to convex-3crv-mv-snap HH task
fix: logs in mv-charge-perf-fee HH task

* fix: charge of performance fee needs to store assets per share with fee shares included

* chore: updated PerfFeeAbstractVault version

* chore: added docgen script using solidity-docgen

* chore: Added HH task vault-max-withdraw

* feat: Added HH task vault-slippage to measure deposit and redeem slippage

* chore: README updated with docgen

* chore: creates npm publish action (#78)

* chore: creates npm publish action

* chore: adds comments to npmrc

* chore: updates github actions to do not run when draft

* chore: updates github actions to do not run when draft

* chore: updates publish config on web-config.ts

* test: increase test coverage on Liquidator (#79)

* test: increse test coverage on Liquidator

* chore: simplified Curve library tests (#81)

* fix: to Curve3CrvAbstractMetaVault reset allowance

* test: increase test coverage on libraries

* chore: added updateAssetPerShare and chargePerformanceFee to fork tests

* chore: removed modules not used by metavaults

* chore: increased coverage of Curve3CrvMetapoolCalculatorLibrary

* chore: bumper version to 0.0.6

* hardhat deploy tasks have optional proxy flag (#85)

* feat: added optional proxy flag to contract deployments so only the implementation can be deployed

* chore: removed unused import in liquidator Hardhat tasks file

Co-authored-by: Nick Addison <nick@addisonbrown.com.au>
Co-authored-by: tushargargght <tushargargght@gmail.com>
Co-authored-by: doncesarts <doncesarts@gmail.com>
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.

2 participants