grappa
grappa copied to clipboard
(wip) refactor: action enum
Summary
Removes ActionType enum and all relevant code in favour of defining in every margin engine repo.
Checklist
Ensure you completed all of the steps below before submitting your pull request:
- [ ] Add natspec for all functions / parameters
- [ ] Ran
forge snapshot - [ ] Ran
forge fmt - [ ] Ran
forge test - [ ] Triage Slither issues, and post uncertain ones in the PR
Gas usage comparison:
| Suite | Case | Gas Diff | Percentage Change |
|---|---|---|---|
BaseDebitSpreadEngineFlow |
testAddCollateralMoveBalance |
:recycle: -249 | -0.37% |
testAddLongShouldMoveToken |
:recycle: -440 | -0.43% | |
testBurnActionShouldBurnOption |
:recycle: -352 | -0.67% | |
testCannotAddCollatFromOthers |
:recycle: -254 | -1.63% | |
testCannotAddLongFromOthers |
:recycle: -227 | -1.41% | |
testCannotBurnFromOthers |
:recycle: -219 | -1.28% | |
testCannotMergeWithSameStrike |
:recycle: -122 | -0.78% | |
testCannotRemoveMoreThanEngineHas |
:recycle: -474 | -0.65% | |
testMergeActionShouldBurnToken |
:recycle: -272 | -0.51% | |
testMintActionShouldMintOption |
:recycle: -214 | -0.36% | |
testRemoveCollateralMoveBalance |
:recycle: -399 | -0.68% | |
testRemoveLongShouldPullToken |
:recycle: -455 | -0.58% | |
testSettlementShouldEmitEvent |
:recycle: -158 | -0.63% | |
testSplitActionShouldMintToken |
:recycle: -236 | -0.39% | |
OptionTransferableTest |
testCanTransferCollat |
:recycle: -648 | -0.61% |
testCannotTransferShortIfEndingUnderwater |
:recycle: -647 | -0.58% | |
testMintOptionToOtherAccount |
:recycle: -647 | -0.40% | |
testTransferLong |
:recycle: -635 | -0.56% | |
testTransferShort |
:recycle: -646 | -0.47% |
Codecov Report
Merging #240 (3340e99) into master (1d18f28) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #240 +/- ##
=======================================
Coverage 91.45% 91.45%
=======================================
Files 14 14
Lines 351 351
Branches 73 73
=======================================
Hits 321 321
Misses 20 20
Partials 10 10
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Please rebase this PR before merging!