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

Fix DSU unwrapping in multi invoker and manager contract #461

Merged
merged 12 commits into from
Oct 10, 2024

Conversation

prateekdefi
Copy link

/// @param account Account to claim fees for
/// @param unwrap Wheather to wrap/unwrap collateral on withdrawal
function withdrawClaimable(address account, bool unwrap) external {
if (msg.sender != account && !operators[account][msg.sender]) revert MultiInvokerUnauthorizedError();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think since we use this pattern twice it might make sense to make it an onlyOperator modifier or helper function like below in Manager.sol?

Copy link
Contributor

Choose a reason for hiding this comment

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

done in f43bbf9

UFixed6 claimableAmount = claimable[account];
claimable[account] = UFixed6Lib.ZERO;

_withdraw(account, claimableAmount, unwrap);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Our pattern has been to push funds to the msg.sender rather than the account (see: https://github.com/equilibria-xyz/perennial-v2/blob/v2.3/packages/perennial/contracts/Market.sol#L322)

Copy link
Contributor

Choose a reason for hiding this comment

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

done in a6161d9

/// @notice withdraw DSU or unwrap DSU to withdraw USDC from this address to `account`
/// @param account Account to claim fees for
/// @param unwrap Wheather to wrap/unwrap collateral on withdrawal
function withdrawClaimable(address account, bool unwrap) external {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: maybe just claim?

Copy link
Contributor

Choose a reason for hiding this comment

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

done in 329265f

@@ -137,6 +141,17 @@ abstract contract Manager is IManager, Kept {
if (interfaceFeeCharged) emit TriggerOrderInterfaceFeeCharged(account, market, order.interfaceFee);
}

/// @inheritdoc IManager
function withdrawClaimable(address account, bool unwrap) external {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comments on naming, where to send funds as above 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

done in 329265f and a6161d9

UFixed6 claimAmount = market.claimFee(account);
_withdraw(account, claimAmount, unwrap);
claimable[account] = claimable[account].add(claimAmount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Upon further thinking, we might just want to keep this as a atomic claim and withdraw rather than putting it in the claimable map.

Since these fees are already in DSU in the market, there's no real gain to claiming them into the multiinvoker and then withdrawing in a separate tx. The process of doing the claim+unwrap (if the unwrap is non-reverting) or a DSU claim (if the unwrap is reverting) is the same with or without the multiinvoker escrow

Copy link
Contributor

Choose a reason for hiding this comment

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

Undid in a23a45e.

Copy link
Contributor

@EdNoepel EdNoepel left a comment

Choose a reason for hiding this comment

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

I do not understand why MultiInvoker and Manager must hold funds to solve this problem. Seems a cleaner solution would be to use exception handling and push the DSU if it cannot be unwrapped.

@EdNoepel EdNoepel marked this pull request as ready for review October 9, 2024 02:15
@EdNoepel EdNoepel requested a review from kbrizzle October 9, 2024 02:16
/// @param unwrap Wheather to wrap/unwrap collateral on withdrawal
function claim(address account, bool unwrap) external onlyOperator(account, msg.sender) {
UFixed6 claimableAmount = claimable[account];
claimable[account] = UFixed6Lib.ZERO;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: delete claimable[account] slightly cleaner here

Copy link
Contributor

Choose a reason for hiding this comment

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

The mapping holds a UFixed6, seemingly incompatible with the unary delete operator.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ope didn't know that 🙏

@@ -28,14 +28,12 @@ struct StoredTriggerOrder {
/* slot 1 */
address interfaceFeeReceiver1;
uint48 interfaceFeeAmount1; // <= 281m
bool interfaceFeeUnwrap1;
bytes5 __unallocated1__;
bytes6 __unallocated1__;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: add a note that these contain dirty data until updated post v2.3 migration

Copy link
Contributor

Choose a reason for hiding this comment

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

done in bb91a17

@@ -129,11 +125,9 @@ library TriggerOrderStorageLib {
bytes6(0),
newValue.interfaceFee1.receiver,
uint48(UFixed6.unwrap(newValue.interfaceFee1.amount)),
newValue.interfaceFee1.unwrap,
bytes5(0),
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be bytes6

Copy link
Contributor

Choose a reason for hiding this comment

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

corrected in bb91a17

bytes5(0),
newValue.interfaceFee2.receiver,
uint48(UFixed6.unwrap(newValue.interfaceFee2.amount)),
newValue.interfaceFee2.unwrap,
bytes5(0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be bytes6

Copy link
Contributor

Choose a reason for hiding this comment

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

corrected in bb91a17

}

/// @notice reads keeper compensation parameters from an action message
function _compensateKeeperAction(Action calldata action) internal {
Copy link
Collaborator

Choose a reason for hiding this comment

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

where are these two new function used? can't see them referenced in any of the other changes.

Copy link
Contributor

@EdNoepel EdNoepel Oct 9, 2024

Choose a reason for hiding this comment

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

Was a merge artifact; removed in bb91a17.

Copy link

github-actions bot commented Oct 9, 2024

[Periphery] Unit Test Coverage Report

Coverage after merging prateek/pe-1740-fix-unwrapping into v2.3-fix-review will be
66.83%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-account/contracts
   Account.sol27.78%100%22.22%29.63%103, 108–109, 58, 64, 67–68, 71, 76–78, 81, 83–84, 89, 94–97
   AccountVerifier.sol100%100%100%100%
   Controller.sol82.08%100%100%77.38%104–106, 113–114, 214, 227, 238, 240–242, 246–248, 251, 261–263, 270
   Controller_Arbitrum.sol0%100%0%0%26, 38
   Controller_Incentivized.sol0%100%0%0%112, 129–130, 147, 155, 157–158, 165, 184–185, 188, 207–208, 211, 230–231, 234, 253–254, 257, 276–277, 280, 292–293, 296, 299, 308–309, 311, 313, 315, 54, 72–78, 95
packages/perennial-account/contracts/libs
   RebalanceLib.sol0%100%0%0%26, 29–30, 32–33, 36, 39, 43
packages/perennial-account/contracts/test
   RebalanceConfigTester.sol100%100%100%100%
packages/perennial-account/contracts/types
   Action.sol100%100%100%100%
   DeployAccount.sol100%100%100%100%
   MarketTransfer.sol100%100%100%100%
   RebalanceConfig.sol100%100%100%100%
   RebalanceConfigChange.sol100%100%100%100%
   RelayedAccessUpdateBatch.sol100%100%100%100%
   RelayedGroupCancellation.sol100%100%100%100%
   RelayedNonceCancellation.sol100%100%100%100%
   RelayedOperatorUpdate.sol100%100%100%100%
   RelayedSignerUpdate.sol100%100%100%100%
   Withdrawal.sol100%100%100%100%
packages/perennial-extensions/contracts
   Coordinator.sol100%100%100%100%
   MultiInvoker.sol89.93%100%92.86%89.26%172, 174, 194, 197, 265, 368, 382, 400, 402, 404, 406, 91–92
   MultiInvoker_Arbitrum.sol0%100%0%0%37, 45
   MultiInvoker_Optimism.sol0%100%0%0%37, 45
packages/perennial-extensions/contracts/types
   TriggerOrder.sol96.43%100%100%95.83%53
packages/perennial-oracle/contracts
   Oracle.sol100%100%100%100%
   OracleFactory.sol93.55%100%88.89%95.45%62
packages/perennial-oracle/contracts/chainlink
   ChainlinkFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/keeper
   KeeperFactory.sol87.36%100%78.57%89.04%164–165, 167–168, 211, 238, 82–83
   KeeperOracle.sol71.05%100%70.59%71.19%107, 152, 161, 163–165, 167, 169–173, 176–177, 217, 70, 84
   KeeperOracle_Migration.sol0%100%0%0%24–25
packages/perennial-oracle/contracts/keeper/libs
   DedupLib.sol100%100%100%100%
packages/perennial-oracle/contracts/keeper/types
   KeeperOracleParameter.sol100%100%100%100%
   PriceResponse.sol100%100%100%100%
packages/perennial-oracle/contracts/metaquants
   MetaQuantsFactory.sol0%100%0%0%19, 30–31, 33–36, 38, 40, 42, 44–45, 54
packages/perennial-oracle/contracts/payoff
   Inverse.sol100%100%100%100%
   PowerHalf.sol100%100%100%100%
   PowerTwo.sol100%100%100%100%
packages/perennial-oracle/contracts/pyth
   PythFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/types
   OracleParameter.sol100%100%100%100%
packages/perennial-order/contracts
   Manager.sol83.53%100%84.21%83.33%166–167, 169, 212, 216, 218, 220, 241–242, 257–258
   Manager_Arbitrum.sol100%100%100%100%
   OrderVerifier.sol100%100%100%100%
packages/perennial-order/contracts/test
   TriggerOrderTester.sol100%100%100%100%
packages/perennial-order/contracts/types
   Action.sol100%100%100%100%
   CancelOrderAction.sol100%100%100%100%
   InterfaceFee.sol100%100%100%100%
   PlaceOrderAction.sol100%100%100%100%
   TriggerOrder.sol100%100%100%100%
packages/perennial-vault/contracts
   Vault.sol0%100%0%0%104–105, 113–114, 123, 125, 132, 134, 140, 142–143, 146, 152–153, 155, 157–158, 165–167, 175–179, 186, 188, 190, 196, 198, 200–203, 206, 212–213, 219–220, 226–227, 229–230, 237–238, 240–242, 256–257, 259–262, 268–269, 271–273, 291–292, 295–305, 308, 311–313, 316–318, 320, 327, 337–338, 345, 348, 352–353, 359–360, 363, 366, 370, 383, 385, 393–398, 408, 414, 431, 445, 447–450, 452, 454–455, 458–460, 464–466, 469–471, 478–480, 487, 500–501, 504, 60, 62–65, 71, 78, 85, 92, 98
   VaultFactory.sol0%100%0%0%30–31, 36, 50, 54–56, 58, 65–66
packages/perennial-vault/contracts/libs
   StrategyLib.sol0%100%0%0%119–120, 122–123, 125–129, 135, 138–139, 153, 156, 160, 162, 165, 167, 179–183, 185–186, 188–189, 191, 197, 199, 202–205, 208, 93–98
packages/perennial-vault/contracts/types
   Account.sol100%100%100%100%
   Checkpoint.sol100%100%100%100%
   Registration.sol100%100%100%100%
   VaultParameter.sol100%100%100%100%
packages/perennial-verifier/contracts
   Verifier.sol100%100%100%100%
packages/perennial-verifier/contracts/types
   AccessUpdate.sol100%100%100%100%
   AccessUpdateBatch.sol100%100%100%100%
   Intent.sol100%100%100%100%
   OperatorUpdate.sol100%100%100%100%
   SignerUpdate.sol100%100%100%100%

Copy link

github-actions bot commented Oct 9, 2024

[Core] Integration Test Coverage Report

Coverage after merging prateek/pe-1740-fix-unwrapping into v2.3-fix-review will be
96.64%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial/contracts
   Market.sol97.21%92%97.78%99.53%111, 111–112, 117, 131, 172, 224, 695, 867
   MarketFactory.sol98.91%96.88%100%100%85
packages/perennial/contracts/interfaces
   IMarket.sol100%100%100%100%
   IMarketFactory.sol100%100%100%100%
   IOracleProvider.sol100%100%100%100%
   IOracleProviderFactory.sol100%100%100%100%
packages/perennial/contracts/libs
   CheckpointLib.sol100%100%100%100%
   InvariantLib.sol63.16%50%100%88.89%110, 116–117, 39–40, 42–43, 43, 43, 43, 52, 56, 56, 64, 69–70, 70, 84–85, 85, 99
   MagicValueLib.sol63.16%50%100%62.50%61–64, 64, 64–65
   VersionLib.sol98.76%95.83%100%99.18%441–442
packages/perennial/contracts/types
   Checkpoint.sol74.07%50%100%100%55–61
   Global.sol79.69%53.57%100%100%140–152
   Guarantee.sol85.25%61.11%91.67%96.77%182–184, 207–210, 86
   Local.sol82.14%50%100%100%91–95
   MarketParameter.sol77.78%50%100%86.67%81–82, 84–85, 95–96
   OracleReceipt.sol100%100%100%100%
   OracleVersion.sol100%100%100%100%
   Order.sol85.12%63.79%96.77%96.20%100, 104, 104, 110–111, 163, 183, 183, 241, 397–402, 473–475, 501–506
   Position.sol77.19%57.69%87.10%80.70%111, 148, 203, 216, 300, 334–336, 350–352, 355, 355, 355, 355, 355–356, 358–360, 419, 441
   ProtocolParameter.sol73.53%50%100%100%71–73, 79–84
   RiskParameter.sol68.83%47.73%100%96.67%133, 139, 141, 147, 149–150, 152–153, 155, 157, 159, 161, 164, 164, 164–165, 175–182
   Version.sol70.27%50%100%100%103–124

Copy link

github-actions bot commented Oct 9, 2024

[Periphery] Integration Test Coverage Report

Coverage after merging prateek/pe-1740-fix-unwrapping into v2.3-fix-review will be
93.70%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-account/contracts
   Account.sol100%100%100%100%
   AccountVerifier.sol90.48%100%90.91%90%32
   Controller.sol92.45%100%90.91%92.86%148, 156, 282, 285, 300, 317
   Controller_Arbitrum.sol100%100%100%100%
   Controller_Incentivized.sol100%100%100%100%
packages/perennial-account/contracts/libs
   RebalanceLib.sol100%100%100%100%
packages/perennial-account/contracts/test
   RebalanceConfigTester.sol0%100%0%0%10, 14
packages/perennial-account/contracts/types
   Action.sol100%100%100%100%
   DeployAccount.sol100%100%100%100%
   MarketTransfer.sol100%100%100%100%
   RebalanceConfig.sol20%100%33.33%14.29%34–35, 43–44, 46, 50
   RebalanceConfigChange.sol85.71%100%100%83.33%43
   RelayedAccessUpdateBatch.sol100%100%100%100%
   RelayedGroupCancellation.sol100%100%100%100%
   RelayedNonceCancellation.sol100%100%100%100%
   RelayedOperatorUpdate.sol100%100%100%100%
   RelayedSignerUpdate.sol100%100%100%100%
   Withdrawal.sol100%100%100%100%
packages/perennial-extensions/contracts
   Coordinator.sol0%100%0%0%18, 24–25, 31–32, 38–40, 47–48
   MultiInvoker.sol100%100%100%100%
   MultiInvoker_Arbitrum.sol0%100%0%0%37, 45
   MultiInvoker_Optimism.sol0%100%0%0%37, 45
packages/perennial-extensions/contracts/types
   TriggerOrder.sol96.43%100%100%95.83%53
packages/perennial-oracle/contracts
   Oracle.sol67.12%100%68.42%66.67%108–109, 118, 145, 168–169, 171, 173–174, 185, 187, 192–193, 57–58, 65, 91, 96
   OracleFactory.sol93.55%100%88.89%95.45%70
packages/perennial-oracle/contracts/chainlink
   ChainlinkFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/keeper
   KeeperFactory.sol95.40%100%85.71%97.26%211, 76
   KeeperOracle.sol96.05%100%94.12%96.61%152, 84
   KeeperOracle_Migration.sol0%100%0%0%24–25
packages/perennial-oracle/contracts/keeper/libs
   DedupLib.sol100%100%100%100%
packages/perennial-oracle/contracts/keeper/types
   KeeperOracleParameter.sol93.75%100%100%92.31%57
   PriceResponse.sol100%100%100%100%
packages/perennial-oracle/contracts/metaquants
   MetaQuantsFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/payoff
   Inverse.sol0%100%0%0%9
   PowerHalf.sol0%100%0%0%11
   PowerTwo.sol100%100%100%100%
packages/perennial-oracle/contracts/pyth
   PythFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/types
   OracleParameter.sol100%100%100%100%
packages/perennial-order/contracts
   Manager.sol100%100%100%100%
   Manager_Arbitrum.sol100%100%100%100%
   OrderVerifier.sol100%100%100%100%
packages/perennial-order/contracts/test
   TriggerOrderTester.sol0%100%0%0%17, 21, 25, 29
packages/perennial-order/contracts/types
   Action.sol100%100%100%100%
   CancelOrderAction.sol100%100%100%100%
   InterfaceFee.sol100%100%100%100%
   PlaceOrderAction.sol100%100%100%100%
   TriggerOrder.sol95.56%100%100%94.29%120, 47
packages/perennial-vault/contracts
   Vault.sol100%100%100%100%
   VaultFactory.sol100%100%100%100%
packages/perennial-vault/contracts/libs
   StrategyLib.sol100%100%100%100%
packages/perennial-vault/contracts/types
   Account.sol100%100%100%100%
   Checkpoint.sol100%100%100%100%
   Registration.sol100%100%100%100%
   VaultParameter.sol100%100%100%100%

Copy link

github-actions bot commented Oct 9, 2024

[Periphery] Combined Test Coverage Report

Coverage after merging prateek/pe-1740-fix-unwrapping into v2.3-fix-review will be
99.04%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-account/contracts
   Account.sol100%100%100%100%
   AccountVerifier.sol100%100%100%100%
   Controller.sol100%100%100%100%
   Controller_Arbitrum.sol100%100%100%100%
   Controller_Incentivized.sol100%100%100%100%
packages/perennial-account/contracts/libs
   RebalanceLib.sol100%100%100%100%
packages/perennial-account/contracts/test
   RebalanceConfigTester.sol100%100%100%100%
packages/perennial-account/contracts/types
   Action.sol100%100%100%100%
   DeployAccount.sol100%100%100%100%
   MarketTransfer.sol100%100%100%100%
   RebalanceConfig.sol100%100%100%100%
   RebalanceConfigChange.sol100%100%100%100%
   RelayedAccessUpdateBatch.sol100%100%100%100%
   RelayedGroupCancellation.sol100%100%100%100%
   RelayedNonceCancellation.sol100%100%100%100%
   RelayedOperatorUpdate.sol100%100%100%100%
   RelayedSignerUpdate.sol100%100%100%100%
   Withdrawal.sol100%100%100%100%
packages/perennial-extensions/contracts
   Coordinator.sol100%100%100%100%
   MultiInvoker.sol100%100%100%100%
   MultiInvoker_Arbitrum.sol0%100%0%0%37, 45
   MultiInvoker_Optimism.sol0%100%0%0%37, 45
packages/perennial-extensions/contracts/types
   TriggerOrder.sol96.43%100%100%95.83%53
packages/perennial-oracle/contracts
   Oracle.sol100%100%100%100%
   OracleFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/chainlink
   ChainlinkFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/keeper
   KeeperFactory.sol97.70%100%92.86%98.63%211
   KeeperOracle.sol96.05%100%94.12%96.61%152, 84
   KeeperOracle_Migration.sol0%100%0%0%24–25
packages/perennial-oracle/contracts/keeper/libs
   DedupLib.sol100%100%100%100%
packages/perennial-oracle/contracts/keeper/types
   KeeperOracleParameter.sol100%100%100%100%
   PriceResponse.sol100%100%100%100%
packages/perennial-oracle/contracts/metaquants
   MetaQuantsFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/payoff
   Inverse.sol100%100%100%100%
   PowerHalf.sol100%100%100%100%
   PowerTwo.sol100%100%100%100%
packages/perennial-oracle/contracts/pyth
   PythFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/types
   OracleParameter.sol100%100%100%100%
packages/perennial-order/contracts
   Manager.sol100%100%100%100%
   Manager_Arbitrum.sol100%100%100%100%
   OrderVerifier.sol100%100%100%100%
packages/perennial-order/contracts/test
   TriggerOrderTester.sol100%100%100%100%
packages/perennial-order/contracts/types
   Action.sol100%100%100%100%
   CancelOrderAction.sol100%100%100%100%
   InterfaceFee.sol100%100%100%100%
   PlaceOrderAction.sol100%100%100%100%
   TriggerOrder.sol100%100%100%100%
packages/perennial-vault/contracts
   Vault.sol100%100%100%100%
   VaultFactory.sol100%100%100%100%
packages/perennial-vault/contracts/libs
   StrategyLib.sol100%100%100%100%
packages/perennial-vault/contracts/types
   Account.sol100%100%100%100%
   Checkpoint.sol100%100%100%100%
   Registration.sol100%100%100%100%
   VaultParameter.sol100%100%100%100%
packages/perennial-verifier/contracts
   Verifier.sol100%100%100%100%
packages/perennial-verifier/contracts/types
   AccessUpdate.sol100%100%100%100%
   AccessUpdateBatch.sol100%100%100%100%
   Intent.sol100%100%100%100%
   OperatorUpdate.sol100%100%100%100%
   SignerUpdate.sol100%100%100%100%

Copy link

github-actions bot commented Oct 9, 2024

[Core] Unit Test Coverage Report

Coverage after merging prateek/pe-1740-fix-unwrapping into v2.3-fix-review will be
98.79%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial/contracts
   Market.sol98.88%98%97.78%99.53%111–112, 131
   MarketFactory.sol100%100%100%100%
packages/perennial/contracts/interfaces
   IMarket.sol100%100%100%100%
   IMarketFactory.sol100%100%100%100%
   IOracleProvider.sol100%100%100%100%
   IOracleProviderFactory.sol100%100%100%100%
packages/perennial/contracts/libs
   CheckpointLib.sol100%100%100%100%
   InvariantLib.sol100%100%100%100%
   MagicValueLib.sol100%100%100%100%
   VersionLib.sol100%100%100%100%
packages/perennial/contracts/types
   Checkpoint.sol100%100%100%100%
   Global.sol96.88%92.86%100%100%146, 148
   Guarantee.sol100%100%100%100%
   Local.sol100%100%100%100%
   MarketParameter.sol100%100%100%100%
   OracleReceipt.sol100%100%100%100%
   OracleVersion.sol100%100%100%100%
   Order.sol98.21%94.83%100%100%100, 104, 400
   Position.sol88.60%84.62%96.77%85.96%350–352, 355, 355, 355, 355, 355–356, 358–360
   ProtocolParameter.sol100%100%100%100%
   RiskParameter.sol94.81%90.91%100%100%139, 175, 178, 182
   Version.sol100%100%100%100%

Copy link

github-actions bot commented Oct 9, 2024

[Core] Combined Test Coverage Report

Coverage after merging prateek/pe-1740-fix-unwrapping into v2.3-fix-review will be
98.79%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial/contracts
   Market.sol99.22%100%97.62%99.53%112
   MarketFactory.sol100%100%100%100%
packages/perennial/contracts/libs
   CheckpointLib.sol100%100%100%100%
   InvariantLib.sol100%100%100%100%
   MagicValueLib.sol100%100%100%100%
   VersionLib.sol100%100%100%100%
packages/perennial/contracts/types
   Checkpoint.sol100%100%100%100%
   Global.sol100%100%100%100%
   Guarantee.sol100%100%100%100%
   Local.sol100%100%100%100%
   MarketParameter.sol100%100%100%100%
   Order.sol100%100%100%100%
   Position.sol89.02%100%96%85.96%350–352, 355–356, 358–360
   ProtocolParameter.sol100%100%100%100%
   RiskParameter.sol100%100%100%100%
   Version.sol100%100%100%100%

@EdNoepel EdNoepel requested a review from kbrizzle October 9, 2024 20:58
@EdNoepel EdNoepel merged commit 640fe2e into v2.3-fix-review Oct 10, 2024
19 checks passed
@EdNoepel EdNoepel deleted the prateek/pe-1740-fix-unwrapping branch October 10, 2024 18:29
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.

4 participants