Commit f2934bd
Perp Leverage Strategy Extension (#5)
* Add PerpV2LeverageStrategyExtension contract, tests
* Fix imports
* Add short position test cases for shouldRebalance
* Add short position test case for shouldRebalanceWithBounds
* Refactor javadocs
* Fix terminology
* Fix bug in getChunkRebalanceNotional and add tests for short case
* Add suggested changes
* Fix failing tests
* Fix when caller is a contract test cases
* Improve javadocs in getCLR & handle account value is 0
* Improve javadocs
* Fix skipped test cases
* Add suggested javadoc changes
* Remove extra line
* Add PerpV2LeverageStrategyExtension contract, tests
* Fix imports
* Add short position test cases for shouldRebalance
* Add short position test case for shouldRebalanceWithBounds
* Refactor javadocs
* Fix terminology
* Fix bug in getChunkRebalanceNotional and add tests for short case
* Add suggested changes
* Fix failing tests
* Fix when caller is a contract test cases
* Improve javadocs in getCLR & handle account value is 0
* Improve javadocs
* Fix skipped test cases
* Add suggested javadoc changes
* Remove extra line
* Update version to 0.0.2-perp.0
* Fix setToken supply = 0 tests / use "fast" set-protocol-v2 typechain artifacts
* Use BaseManager (V1) in tests
* Remove spec todo
* Revert pre-release package version bump
* Remove unused log statements
* Move absUint256 function to PreciseUnitMath
Co-authored-by: alpha-guy <[email protected]>1 parent 43599f4 commit f2934bd
File tree
12 files changed
+6710
-13
lines changed- contracts
- extensions
- lib
- test/extensions
- utils
- contracts
- deploys
- flexibleLeverageUtils
12 files changed
+6710
-13
lines changedLines changed: 1135 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
198 | 208 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
0 commit comments