SetProtocol / set-protocol-v2

Set Protocol V2
118 stars 94 forks source link

chore(tests): Add BasisModule <> SlippageIssuance Integration Tests #229

Closed 0xSachinK closed 2 years ago

0xSachinK commented 2 years ago

Review suggestions

Additions to unit tests

cgewecke commented 2 years ago

(Closing and re-opening to see if that fixes semantic release bot failure)

0xSachinK commented 2 years ago

@cgewecke

  1. Added in f66a973d4.
  2. Tests for withdrawFundingAndAccrueFees are added as part of unit tests.
  3. How do we use getRedemptionAdjustments in the redemption flow? Can you give a specific example? We do have tests for getRedemptionAdjustments as part of unit tests.
  4. Added tests for depositing entire withdrawn amount in b46101. I was unable to reproduce the bug reported by iosiro, but working on it.
  5. Added tests for setting performance fee after pushing tracked settled funding to zero by withdrawing and funding in 897a00b.
cgewecke commented 2 years ago

How do we use getRedemptionAdjustments in the redemption flow? Can you give a specific example? We do have tests for getRedemptionAdjustments as part of unit tests

I'm thinking of something that models what happens at set-ui...

// Displayed
units = slippageIssuanceModule
  .callStatic
  .getRequiredComponentRedemptionUnitsOffChain(setToken, quantity);

// Real
slippageIssuanceModule.redeem(setToken, quantity)

// Test
Does displayed units match the redeem transaction outcome?

Does that make sense?

0xSachinK commented 2 years ago

@cgewecke Added in 9b88be4

0xSachinK commented 2 years ago

Edited PR description to track all fixes. Rebased branch to master.

cgewecke commented 2 years ago

:tada: This PR is included in version 0.9.0-hhat.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: