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

feature: signed account access #20

Merged
merged 8 commits into from
Oct 12, 2023
Merged

Conversation

swissarmytowel
Copy link
Contributor

@swissarmytowel swissarmytowel commented Sep 15, 2023

Summary

Adds functionality to set allowed executions on behalf of the account with the signed message verification.

Bumps core-cash and core-physical to the latest commits.

Details

Implements account access setter for _account and _actor. Access granted is reliant on the signature contents and checks recovered address against the _account, it can be called by anyone as long as the passed signature is correct and was signed by the _account private key which is a confirmation that the _account allowed this

Guarded against replay attacks by using nonces.

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

@swissarmytowel swissarmytowel changed the title Feature/signed account access feature: signed account access Sep 15, 2023
@github-actions
Copy link

github-actions bot commented Sep 15, 2023

Gas usage comparison:

Test Name Gas Diff Percentage Change
CashEngineProxyTest:testCanUpgradeToAnotherUUPSContract() ⛽ +80 0.01%
CashEngineProxyTest:testCannotUpgradeFromNonOwner() ♻️ -10 -0.06%
CashEngineProxyTest:testCannotUpgradeTov3() ⛽ +2 0.00%
CashEngineProxyTest:testImplementationContractOwnerIsZero() ⛽ +49 0.64%
CashEngineProxyTest:testImplementationIsInitialized() ⛽ +78 0.71%
CashEngineProxyTest:testProxyIsInitialized() ⛽ +57 0.36%
CashEngineProxyTest:testProxyOwnerIsSelf() ⛽ +49 0.39%
CrossMarginCashEngineAccessTest:test() ⛽ +22 13.41%
CrossMarginCashEngineAccessTest:testCannotTransferToOverrideAnotherAccount() ⛽ +110 0.09%
CrossMarginCashEngineAccessTest:testCannotTransferUnAuthorizedAccount() ⛽ +45 0.29%
CrossMarginCashEngineAccessTest:testTransferCMAccount() ⛽ +132 0.10%
CrossMarginPhysicalEngineAccessTest:testCannotTransferToOverrideAnotherAccount() ♻️ -44 -0.04%
CrossMarginPhysicalEngineAccessTest:testCannotTransferUnAuthorizedAccount() ♻️ -22 -0.14%
CrossMarginPhysicalEngineAccessTest:testTransferCMAccount() ♻️ -66 -0.05%
General_CMC:test() ⛽ +22 13.41%
General_CMC:testCannotCallAddLongWithExpiredToken() ⛽ +65 0.25%
General_CMC:testCannotCallAddLongWithNotAuthorizedEngine() ⛽ +65 0.12%
General_CMC:testCannotCallRemoveLongNotInAccount() ⛽ +65 0.20%
General_CMC:testGetMinCollateral() ⛽ +42 0.01%
General_CMP:testCannotCallAddLongWithExpiredOption() ♻️ -22 -0.08%
General_CMP:testCannotCallAddLongWithNotAuthorizedEngine() ♻️ -22 -0.04%
General_CMP:testCannotCallPayoutFromAnybody() ⛽ +66 0.37%
General_CMP:testCannotCallRemoveLongNotInAccount() ♻️ -22 -0.07%
Permissioned_CMC:testAliceCanSettleOption() ⛽ +64 0.02%
Permissioned_CMC:testCanExecute() ⛽ +110 0.07%
Permissioned_CMC:testCannotExecute() ⛽ +65 0.22%
Permissioned_CMC:testCannotSettleOption() ⛽ +64 0.02%
Permissioned_CMP:testAliceCanSettleOption() ⛽ +80 0.02%
Permissioned_CMP:testCanExecute() ♻️ -44 -0.03%
Permissioned_CMP:testCannotExecute() ♻️ -22 -0.07%
Permissioned_CMP:testCannotSettleOption() ⛽ +12 0.00%
PhysicalEngineProxyTest:testCanUpgradeToAnotherUUPSContract() ⛽ +80 0.01%
PhysicalEngineProxyTest:testCannotUpgradeFromNonOwner() ♻️ -10 -0.06%
PhysicalEngineProxyTest:testCannotUpgradeTov3() ⛽ +2 0.00%
PhysicalEngineProxyTest:testImplementationContractOwnerIsZero() ⛽ +49 0.64%
PhysicalEngineProxyTest:testImplementationIsInitialized() ♻️ -10 -0.09%
PhysicalEngineProxyTest:testProxyIsInitialized() ♻️ -31 -0.20%
PhysicalEngineProxyTest:testProxyOwnerIsSelf() ⛽ +49 0.39%
PreviewCollateralReqBase_CMC:test() ⛽ +22 13.41%
PreviewCollateralReq_CMCM:test() ⛽ +22 10.58%
PreviewCollateralReq_CMCM:testConversion() ♻️ -44 -0.04%
PreviewCollateralReq_CMCM:testIronCondor() ♻️ -22 -0.02%
PreviewCollateralReq_CMCM:testLongStrangleSpread2() ♻️ -22 -0.02%
PreviewCollateralReq_CMCM:testLongStrangles() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testMarginBinaryCallOption() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testMarginCallSpreadSameUnderlyingCollateral() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testMarginLongBinaryPut() ♻️ -86 -0.13%
PreviewCollateralReq_CMCM:testMarginRequirement2() ♻️ -22 -0.01%
PreviewCollateralReq_CMCM:testMarginSimpleITMCall() ♻️ -65 -0.12%
PreviewCollateralReq_CMCM:testMarginSimpleITMPut() ♻️ -22 -0.04%
PreviewCollateralReq_CMCM:testMarginUnsortedStrikes() ♻️ -22 -0.01%
PreviewCollateralReq_CMCM:testOneByTwoCall() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testPutGreaterThanCalls() ♻️ -67 -0.06%
PreviewCollateralReq_CMCM:testShortPutSpread() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testShortStrangles() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testStrangleSpread() ♻️ -22 -0.02%
PreviewCollateralReq_CMCM:testStrangleSpread2() ♻️ -22 -0.02%
PreviewCollateralReq_CMCM:testUpAndDown1() ♻️ -22 -0.03%
PreviewCollateralReq_CMCM:testUpAndDown3() ♻️ -22 -0.02%
PreviewCollateralReq_CMCM:testUpAndDown4() ♻️ -67 -0.06%
PreviewCollateralReq_CMPM:testConversion() ♻️ -44 -0.04%
PreviewCollateralReq_CMPM:testIronCondor() ⛽ +6 0.01%
PreviewCollateralReq_CMPM:testLongPutSpread() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testLongStrangles() ⛽ +6 0.01%
PreviewCollateralReq_CMPM:testMarginBinaryCallOption() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testMarginCallSpreadSameUnderlyingCollateral() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testMarginCallSpreadSameUnderlyingCollateralBiggerNumbers() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testMarginLongBinaryPut() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testMarginRequirement1() ⛽ +6 0.00%
PreviewCollateralReq_CMPM:testMarginRequirement2() ⛽ +6 0.00%
PreviewCollateralReq_CMPM:testMarginRequirement3() ⛽ +6 0.00%
PreviewCollateralReq_CMPM:testMarginRequirement4() ⛽ +6 0.00%
PreviewCollateralReq_CMPM:testMarginRequirementsVanillaCall() ♻️ -22 -0.04%
PreviewCollateralReq_CMPM:testMarginRequirementsVanillaPut() ♻️ -22 -0.04%
PreviewCollateralReq_CMPM:testMarginShortBinaryPut() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testMarginSimpleCall() ♻️ -22 -0.04%
PreviewCollateralReq_CMPM:testMarginSimplePut() ♻️ -22 -0.04%
PreviewCollateralReq_CMPM:testMarginUnsortedStrikes() ⛽ +6 0.00%
PreviewCollateralReq_CMPM:testOneByTwoCall() ⛽ +20 0.03%
PreviewCollateralReq_CMPM:testOneByTwoPut() ⛽ +20 0.02%
PreviewCollateralReq_CMPM:testPutGreaterThanCalls() ⛽ +6 0.01%
PreviewCollateralReq_CMPM:testShortPutSpread() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testShortStrangles() ♻️ -22 -0.03%
PreviewCollateralReq_CMPM:testStrangleSpread() ⛽ +6 0.01%
PreviewCollateralReq_CMPM:testStrangleSpread2() ⛽ +6 0.01%
PreviewCollateralReq_CMPM:testUpAndDown1() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testUpAndDown2() ♻️ -8 -0.01%
PreviewCollateralReq_CMPM:testUpAndDown3() ⛽ +6 0.01%
PreviewCollateralReq_CMPM:testUpAndDown4() ⛽ +6 0.01%
TestAddCollateral_CMC:test() ♻️ -45 -21.53%
TestAddCollateral_CMC:testAddCollateralChangeStorage() ⛽ +132 0.10%
TestAddCollateral_CMC:testAddCollateralLoopMoveBalances() ⛽ +65 0.05%
TestAddCollateral_CMC:testAddCollateralMoveBalance() ⛽ +22 0.02%
TestAddCollateral_CMC:testAddMultipleCollateralHasNoSideEffects() ⛽ +65 0.03%
TestAddCollateral_CMC:testCanAddDifferentCollateralToSameAccount() ⛽ +65 0.03%
TestAddCollateral_CMC:testCannotAddCollatFromOthers() ⛽ +87 0.32%
TestAddCollateral_CMP:testAddCollateralChangeStorage() ♻️ -44 -0.03%
TestAddCollateral_CMP:testAddCollateralLoopMoveBalances() ♻️ -22 -0.02%
TestAddCollateral_CMP:testAddCollateralMoveBalance() ♻️ -22 -0.02%
TestAddCollateral_CMP:testAddMultipleCollateralHasNoSideEffects() ♻️ -22 -0.01%
TestAddCollateral_CMP:testCanAddDifferentCollateralToSameAccount() ♻️ -44 -0.02%
TestAddCollateral_CMP:testCannotAddCollatFromOthers() ♻️ -22 -0.08%
TestAddLong_CMC:test() ⛽ +22 13.41%
TestAddLong_CMC:testAddLongCallToken() ⛽ +84 0.02%
TestAddLong_CMC:testAddLongPutToken() ⛽ +84 0.02%
TestAddLong_CMP:testAddLongCallToken() ⛽ +15 0.00%
TestAddLong_CMP:testAddLongPutToken() ⛽ +15 0.00%
TestBatchExecute_CMC:testMintSpreadChecksCollateralAfterBatch() ⛽ +112 0.02%
TestBatchExecute_CMC:testMintTwoSidedStructure() ⛽ +112 0.02%
TestBatchExecute_CMC:testMintTwoSidesSameOption() ⛽ +112 0.02%
TestBatchExecute_CMP:testMintSpreadChecksCollateralAfterBatch() ⛽ +96 0.02%
TestBatchExecute_CMP:testMintTwoSidedStructure() ⛽ +96 0.01%
TestBatchExecute_CMP:testMintTwoSidesSameOption() ⛽ +96 0.02%
TestBurnOption_CMC:test() ⛽ +22 13.41%
TestBurnOption_CMC:testBurn() ⛽ +53 0.08%
TestBurnOption_CMC:testCannotBurnForEmptyAccount() ⛽ +65 0.19%
TestBurnOption_CMC:testCannotBurnFromUnAuthorizedAccount() ⛽ +87 0.13%
TestBurnOption_CMC:testCannotBurnWhenOptionTokenBalanceIsLow() ⛽ +65 0.06%
TestBurnOption_CMC:testCannotBurnWithWrongTokenId() ⛽ +65 0.17%
TestBurnOption_CMP:testBurn() ♻️ -36 -0.05%
TestBurnOption_CMP:testCannotBurnForEmptyAccount() ♻️ -22 -0.06%
TestBurnOption_CMP:testCannotBurnFromUnAuthorizedAccount() ♻️ -22 -0.03%
TestBurnOption_CMP:testCannotBurnWhenOptionTokenBalanceIsLow() ♻️ -22 -0.02%
TestBurnOption_CMP:testCannotBurnWithWrongTokenId() ♻️ -22 -0.05%
TestExerciseLongPositions_CMP:testCanClearLongCallAfterExpiryBeforeWindowClosed() ⛽ +81 0.02%
TestExerciseLongPositions_CMP:testCanClearLongPastExerciseWindow() ♻️ -21 -0.01%
TestExerciseLongPositions_CMP:testCanClearLongPortion() ⛽ +37 0.01%
TestExerciseLongPositions_CMP:testCanClearMultipleLongCallAfterExpiryBeforeWindowClosed() ⛽ +165 0.03%
TestExerciseLongPositions_CMP:testCanClearPortionPut() ⛽ +81 0.02%
TestExerciseLongPositions_CMP:testCanClearPutBeforeWindowClosed() ⛽ +81 0.02%
TestExerciseLongPositions_CMP:testCannotClearLongCallAfterWindowClosed() ♻️ -6 -0.00%
TestExerciseLongPositions_CMP:testCannotClearLongPutAfterWindowClosed() ♻️ -6 -0.00%
TestExerciseLongPositions_CMP:testCannotClearLongWithExceededAmount() ⛽ +1 0.00%
TestLongShortSettlement:test() ⛽ +22 13.41%
TestLongShortSettlement:testShortsAreSettledBeforeLongs() ⛽ +84 0.01%
TestMintIntoAccount_CMC:test() ⛽ +22 13.41%
TestMintIntoAccount_CMC:testMintIntoAccountCall() ⛽ +87 0.03%
TestMintIntoAccount_CMP:testMintIntoAccountCall() ⛽ +15 0.00%
TestMintWithPartialMarginBeta_CMC:test() ⛽ +22 11.83%
TestMintWithPartialMarginBeta_CMC:testCannotMintTooLittleCollateral() ⛽ +197 0.04%
TestMintWithPartialMarginBeta_CMC:testMintCall() ⛽ +154 0.05%
TestMintWithPartialMarginBeta_CMC:testMintCallWithHigherValueCollateral() ⛽ +65 0.02%
TestMintWithPartialMarginBeta_CMC:testMintCallWithSimilarCollateral() ⛽ +198 0.05%
TestMintWithPartialMarginBeta_CMC:testMintMixedBag() ⛽ +286 0.04%
TestMintWithPartialMarginBeta_CMC:testMintMixedBagWithVariableValueCollateral() ⛽ +132 0.02%
TestMintWithPartialMarginBeta_CMC:testMintPut() ⛽ +176 0.06%
TestMintWithPartialMarginBeta_CMC:testMintPutWithHigherValueCollateral() ⛽ +110 0.04%
TestMintWithPartialMarginBeta_CMC:testMintPutWithSimilarCollateral() ⛽ +198 0.05%
TestMintWithPartialMarginBeta_CMC:testRemovePartialMarginMask() ⛽ +154 0.14%
TestMintWithPartialMarginBeta_CMC:testSameAssetPartialMarginMask() ⛽ +22 0.09%
TestMintWithPartialMarginBeta_CMP:testCannotMintTooLittleCollateral() ♻️ -22 -0.00%
TestMintWithPartialMarginBeta_CMP:testMintCall() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintCallWithHigherValueCollateral() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintCallWithSimilarCollateral() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintMixedBag() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintMixedBagWithVariableValueCollateral() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintPut() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintPutWithHigherValueCollateral() ♻️ -44 -0.01%
TestMintWithPartialMarginBeta_CMP:testMintPutWithSimilarCollateral() ♻️ -44 -0.01%
TestMint_CMC:test() ⛽ +22 11.83%
TestMint_CMC:testCannotMintCallSpread() ⛽ +87 0.07%
TestMint_CMC:testCannotMintCallWithLittleCollateral() ⛽ +42 0.02%
TestMint_CMC:testCannotMintExpiredOption() ⛽ +65 0.06%
TestMint_CMC:testCannotMintPutSpread() ⛽ +87 0.07%
TestMint_CMC:testCannotMintPutWithLittleCollateral() ⛽ +42 0.02%
TestMint_CMC:testCannotMintWithoutCollateral() ⛽ +87 0.05%
TestMint_CMC:testMintCall() ⛽ +132 0.05%
TestMint_CMC:testMintCallAndPutInSameAccount() ⛽ +89 0.02%
TestMint_CMC:testMintPut() ⛽ +132 0.05%
TestMint_CMP:testCannotMintCallWithLittleCollateral() ♻️ -22 -0.01%
TestMint_CMP:testCannotMintExpiredOption() ♻️ -22 -0.02%
TestMint_CMP:testCannotMintPutWithLittleCollateral() ♻️ -22 -0.01%
TestMint_CMP:testCannotMintWithoutCollateral() ♻️ -22 -0.01%
TestMint_CMP:testMintCall() ♻️ -44 -0.02%
TestMint_CMP:testMintCallAndPutInSameAccount() ♻️ -44 -0.01%
TestMint_CMP:testMintPut() ♻️ -44 -0.02%
TestPMRemoveCollateral_CMC:test() ⛽ +22 13.41%
TestPMRemoveCollateral_CMC:testEqualCallSpreadCollateralWithdraw() ⛽ +261 0.04%
TestPMRemoveCollateral_CMC:testEqualPutSpreadCollateralWithdraw() ⛽ +326 0.05%
TestPMRemoveCollateral_CMC:testEqualShortLongAllowCollateralWithdraw() ⛽ +348 0.05%
TestPMRemoveCollateral_CMC:testUtils() ♻️ -23 -13.77%
TestPMRemoveCollateral_CMP:testEqualCallSpreadCollateralWithdraw() ♻️ -1 -0.00%
TestPMRemoveCollateral_CMP:testEqualPutSpreadCollateralWithdraw() ♻️ -1 -0.00%
TestPMRemoveCollateral_CMP:testEqualShortLongAllowCollateralWithdraw() ⛽ +35 0.01%
TestPMSettleLongCalls_CMC:test() ⛽ +22 13.41%
TestPMSettleLongCalls_CMC:testSettleLongCallITMIncreasesCollateral() ⛽ +154 0.09%
TestPMSettleLongCalls_CMC:testSettleLongCallOTMNoIncreaseInCollateral() ⛽ +154 0.13%
TestPMSettleLongCalls_CMC:testSettleMultipleLongCallsITMIncreasesCollateral() ⛽ +196 0.05%
TestPMSettleLongCalls_CMC:testSettleMultipleLongCallsOTMNoIncreaseInCollateral() ⛽ +175 0.06%
TestPMSettleLongCalls_CMC:testSettleOnlyExpiredLongCallOTMNoIncreaseInCollateral() ⛽ +241 0.07%
TestPMSettleLongPutsCM:test() ⛽ +22 13.41%
TestPMSettleLongPutsCM:testSettleLongCallITMIncreasesCollateral() ⛽ +154 0.09%
TestPMSettleLongPutsCM:testSettleLongCallOTMNoIncreaseInCollateral() ⛽ +154 0.13%
TestPMSettleLongStrangleSpreadCM:test() ⛽ +22 13.41%
TestPMSettleLongStrangleSpreadCM:testSettleLongCallInnerITM() ⛽ +100 0.03%
TestPMSettleLongStrangleSpreadCM:testSettleLongCallOuterITM() ⛽ +100 0.03%
TestPMSettleLongStrangleSpreadCM:testSettleLongPutInnerITM() ⛽ +100 0.03%
TestPMSettleLongStrangleSpreadCM:testSettleLongPutOuterITM() ⛽ +100 0.03%
TestPMSettleLongStrangleSpreadCM:testSettleShortPutOTM() ⛽ +47 0.02%
TestRemoveCollateral_CMC:test() ⛽ +22 13.41%
TestRemoveCollateral_CMC:testCannotRemoveDifferentCollateral() ⛽ +65 0.18%
TestRemoveCollateral_CMC:testCannotRemoveMoreThanOwn() ⛽ +65 0.18%
TestRemoveCollateral_CMC:testMultipleCollateralsAddRemove() ⛽ +682 0.24%
TestRemoveCollateral_CMC:testRemoveCollateralChangeStorage() ⛽ +65 0.11%
TestRemoveCollateral_CMC:testRemoveCollateralMoveBalance() ⛽ +87 0.14%
TestRemoveCollateral_CMC:testRemoveCollateralRetainBalances() ⛽ +66 0.06%
TestRemoveCollateral_CMP:testCannotRemoveDifferentCollateral() ♻️ -22 -0.06%
TestRemoveCollateral_CMP:testCannotRemoveMoreThanOwn() ♻️ -22 -0.06%
TestRemoveCollateral_CMP:testMultipleCollateralsAddRemove() ♻️ -264 -0.09%
TestRemoveCollateral_CMP:testRemoveCollateralChangeStorage() ♻️ -44 -0.07%
TestRemoveCollateral_CMP:testRemoveCollateralMoveBalance() ♻️ -22 -0.03%
TestRemoveCollateral_CMP:testRemoveCollateralRetainBalances() ♻️ -44 -0.04%
TestRemoveLong_CMC:test() ⛽ +22 13.41%
TestRemoveLong_CMC:testRemoveLongToken() ⛽ +137 0.04%
TestRemoveLong_CMP:testRemoveLongToken() ♻️ -6 -0.00%
TestSettleCollateralizedPut_CMC:test() ⛽ +22 13.41%
TestSettleCollateralizedPut_CMC:testSellerCanClearOnlyExpiredOptions() ⛽ +219 0.08%
TestSettleCollateralizedPut_CMC:testSellerCollateralIsReducedIfExpiresITM() ⛽ +154 0.14%
TestSettleCollateralizedPut_CMC:testShouldGetNothingIfExpiresOTM() ♻️ -46 -0.04%
TestSettleCollateralizedPut_CMC:testShouldGetPayoutIfExpiresIMT() ♻️ -1 -0.00%
TestSettleCollateralizedPut_CMP:testShouldGetPutPayoutAndDeductedDebt() ⛽ +102 0.05%
TestSettleCollateralizedPut_CMP:testShouldGetPutPayoutAndDeductedDebtFromSender() ⛽ +124 0.06%
TestSettleCoveredCall_CMC:test() ⛽ +22 13.41%
TestSettleCoveredCall_CMC:testSellerCanClearDebtIfExpiresOTM() ⛽ +110 0.10%
TestSettleCoveredCall_CMC:testSellerCanClearMultipleExpiredOptions() ⛽ +196 0.08%
TestSettleCoveredCall_CMC:testSellerCanClearOnlyExpiredOptions() ⛽ +219 0.08%
TestSettleCoveredCall_CMC:testSellerCollateralIsReducedIfExpiresITM() ⛽ +176 0.15%
TestSettleCoveredCall_CMC:testShouldGetNothingIfExpiresOTM() ♻️ -46 -0.04%
TestSettleCoveredCall_CMC:testShouldGetPayoutIfExpiresIMT() ♻️ -46 -0.04%
TestSettleCoveredCall_CMP:testShouldGetCallPayoutAndDeductedDebt() ⛽ +102 0.06%
TestSettleCoveredCall_CMP:testShouldGetCallPayoutAndDeductedDebtFromSender() ⛽ +124 0.06%
TestSettleOptionPartialMargin_CMC:test() ⛽ +22 13.41%
TestSettleOptionPartialMargin_CMC:testCallITM() ⛽ +171 0.05%
TestSettleOptionPartialMargin_CMC:testPutITM() ⛽ +171 0.05%
TestSettleOptionPartialMargin_CMP:testCall() ⛽ +36 0.01%
TestSettleOptionPartialMargin_CMP:testPut() ⛽ +36 0.01%
TestSettleOption_CMP:testGetsNothingFromOptionPastExerciseWindow() ♻️ -62 -0.10%
TestSettleShortPositions_CMP:testSellerCanClearCallDebtAfterWindowClosed() ♻️ -119 -0.04%
TestSettleShortPositions_CMP:testSellerCanClearPartialCallDebtAfterWindowClosed() ♻️ -17 -0.00%
TestSettleShortPositions_CMP:testSellerCanClearPartialPutDebtAfterWindowClosed() ♻️ -17 -0.00%
TestSettleShortPositions_CMP:testSellerCanClearPutDebtAfterWindowClosed() ♻️ -119 -0.04%
TestSettleShortPositions_CMP:testSellerCannotClearCallDebtAfterExpiryBeforeWindowClosed() ♻️ -88 -0.03%
TestSettleShortPositions_CMP:testSellerCannotClearPutDebtAfterExpiryBeforeWindowClosed() ♻️ -88 -0.03%
TestSettleSocializedLosses_CMP:testSocializeLoss() ♻️ -92 -0.02%
TestTransfer_CMC:test() ⛽ +22 11.83%
TestTransfer_CMC:testCannotTransferCollateralWhenShortExists() ⛽ +65 0.05%
TestTransfer_CMC:testCannotTransferLongWhenTooLittleCollateral() ⛽ +87 0.05%
TestTransfer_CMC:testCannotTransferShortWhenReceiverHasTooLittleCollateral() ⛽ +87 0.05%
TestTransfer_CMC:testCannotTransferShortWithNoAccess() ⛽ +65 0.19%
TestTransfer_CMC:testTransferCollateral() ⛽ +177 0.07%
TestTransfer_CMP:testCannotTransferCollateralWhenShortExists() ♻️ -8 -0.01%
TestTransfer_CMP:testCannotTransferLongWhenTooLittleCollateral() ♻️ -22 -0.01%
TestTransfer_CMP:testCannotTransferShortWhenReceiverHasTooLittleCollateral() ♻️ -22 -0.01%
TestTransfer_CMP:testCannotTransferShortWithNoAccess() ♻️ -22 -0.06%
TestTransfer_CMP:testTransferCollateral() ♻️ -52 -0.02%

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #20 (c597bb9) into master (c169d8e) will increase coverage by 0.51%.
The diff coverage is 80.00%.

❗ Current head c597bb9 differs from pull request most recent head 7f23de6. Consider uploading reports for the commit 7f23de6 to get more accurate results

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
+ Coverage   80.16%   80.67%   +0.51%     
==========================================
  Files           8        9       +1     
  Lines         746      771      +25     
  Branches      181      185       +4     
==========================================
+ Hits          598      622      +24     
+ Misses         70       69       -1     
- Partials       78       80       +2     
Files Coverage Δ
src/settled-cash/CrossMarginCashEngine.sol 84.09% <100.00%> (+2.94%) ⬆️
src/settled-physical/CrossMarginPhysicalEngine.sol 83.95% <100.00%> (+2.37%) ⬆️
script/deploy-upgrade-physical.sol 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

.gitmodules Outdated Show resolved Hide resolved
src/settled-cash/CrossMarginCashEngine.sol Outdated Show resolved Hide resolved
src/settled-cash/CrossMarginCashEngine.sol Outdated Show resolved Hide resolved
src/settled-cash/CrossMarginCashEngine.sol Outdated Show resolved Hide resolved
@dsshap dsshap merged commit 5796282 into master Oct 12, 2023
4 checks passed
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