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] closableAmount initialization in MultiInvoker #110

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

kbrizzle
Copy link
Collaborator

Updates closableAmount initialization logic to match that in Market.

@kbrizzle kbrizzle added the protocol change Modifies the protocol label Sep 26, 2023
@github-actions
Copy link

[Payoff] Integration Test Code Coverage Report

Coverage after merging britz-review-44 into main will be
100.00%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-payoff/contracts
   PayoffFactory.sol100%100%100%100%
packages/perennial-payoff/contracts/interfaces
   IPayoffFactory.sol100%100%100%100%
packages/perennial-payoff/contracts/payoff
   Giga.sol100%100%100%100%
   Kilo.sol100%100%100%100%
   KiloPowerHalf.sol100%100%100%100%
   KiloPowerTwo.sol100%100%100%100%
   Mega.sol100%100%100%100%
   MegaPowerTwo.sol100%100%100%100%
   Micro.sol100%100%100%100%
   MicroPowerTwo.sol100%100%100%100%
   Milli.sol100%100%100%100%
   MilliPowerHalf.sol100%100%100%100%
   MilliPowerTwo.sol100%100%100%100%
   Nano.sol100%100%100%100%
   PowerHalf.sol100%100%100%100%
   PowerTwo.sol100%100%100%100%

@github-actions
Copy link

[Extensions] Unit Test Coverage Report

Coverage after merging britz-review-44 into main will be
80.69%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-extensions/contracts
   MultiInvoker.sol76.82%71.43%86.36%78.74%103, 143–144, 147–149, 151, 156, 225, 225–226, 228–229, 231, 240, 283, 283, 285, 288, 297, 297, 299, 302, 320, 322, 322, 322–323, 325, 330, 340–341, 344–345, 347, 370, 387–388, 388, 388–389, 391–392, 413, 419, 445, 462, 76, 79–81
packages/perennial-extensions/contracts/interfaces
   IMultiInvoker.sol100%100%100%100%
packages/perennial-extensions/contracts/types
   TriggerOrder.sol78.26%62.50%100%94.44%34–35, 62–69

@github-actions
Copy link

[Vault] Unit Test Coverage Report

Coverage after merging britz-review-44 into main will be
28.39%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-vault/contracts
   Vault.sol0%0%0%0%100, 106, 112–113, 121–122, 131, 133, 133, 133, 140, 142, 142, 142, 147, 147–148, 150–151, 151, 151, 154, 160, 160, 160–161, 161, 161, 163, 165–167, 174, 174–176, 184, 184, 184, 186–190, 195, 195–197, 203–204, 209, 209–212, 219, 219–221, 223–225, 238, 238–240, 242–245, 251–252, 252, 252–255, 257, 275, 275, 275–276, 276, 276, 279, 279, 279–281, 281, 281–283, 283, 283–285, 285, 285–287, 287, 287–289, 289, 289–290, 292, 292, 292, 295, 298–300, 303–305, 307, 321–323, 323, 326, 326, 326, 331–332, 347, 351–354, 356, 362, 365, 365, 365, 368, 368, 368, 372–374, 387, 389, 389, 389, 389, 389, 391, 397–398, 398, 398–401, 401, 401–402, 409, 412, 414, 424, 438, 440–443, 445, 447–450, 453–456, 458–461, 464–467, 469–471, 474–475, 478, 478, 478–480, 487, 487, 487–489, 496, 496, 496–498, 505, 505, 505, 507–510, 512, 512, 512–513, 513, 513, 513, 518, 524, 534–536, 544–545, 567–569, 575–577, 587–589, 59, 59, 591–593, 60, 62–66, 72, 79, 86, 93
   VaultFactory.sol0%0%0%0%30–31, 35, 35–36, 48, 48–49, 52, 56–58, 60, 67–68
packages/perennial-vault/contracts/interfaces
   IVault.sol100%100%100%100%
   IVaultFactory.sol100%100%100%100%
packages/perennial-vault/contracts/lib
   StrategyLib.sol0%0%0%0%107–111, 114–115, 120, 123–124, 131–133, 146, 148, 151–152, 164–166, 175, 70–72, 74, 76–79, 82, 86, 88, 88, 88, 88, 88–89, 91, 93
packages/perennial-vault/contracts/types
   Account.sol100%100%100%100%
   Checkpoint.sol100%100%100%100%
   Mapping.sol100%100%100%100%
   Registration.sol100%100%100%100%
   VaultParameter.sol100%100%100%100%

@github-actions
Copy link

[Oracle] Unit Test Coverage Report

Coverage after merging britz-review-44 into main will be
79.25%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-oracle/contracts
   Oracle.sol100%100%100%100%
   OracleFactory.sol100%100%100%100%
packages/perennial-oracle/contracts/interfaces
   IOracle.sol100%100%100%100%
   IOracleFactory.sol100%100%100%100%
   IPythFactory.sol100%100%100%100%
   IPythOracle.sol100%100%100%100%
packages/perennial-oracle/contracts/pyth
   PythFactory.sol57.14%31.82%77.78%72%100, 106, 117, 44, 53, 60–61, 75, 84, 89, 89–91, 91, 91–92, 92, 92–93, 93, 93, 95
   PythOracle_Arbitrum.sol0%100%0%0%15, 20
   PythOracle_Optimism.sol0%100%0%0%15, 20
   PythOracle.sol52.89%35.42%73.33%62.07%114–115, 121, 121, 121, 132, 137–138, 144, 148–149, 151, 151, 151, 154, 154, 154, 177, 177, 177, 182–183, 186, 189, 189, 189–190, 193–194, 194, 194, 196, 196, 196–197, 197, 197–199, 199, 199, 199, 199, 201–203, 245, 66, 70, 76, 81, 83, 93

@github-actions
Copy link

[Payoff] Unit Test Code Coverage Report

Coverage after merging britz-review-44 into main will be
100.00%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-payoff/contracts
   PayoffFactory.sol100%100%100%100%
packages/perennial-payoff/contracts/interfaces
   IPayoffFactory.sol100%100%100%100%
packages/perennial-payoff/contracts/payoff
   Giga.sol100%100%100%100%
   Kilo.sol100%100%100%100%
   KiloPowerHalf.sol100%100%100%100%
   KiloPowerTwo.sol100%100%100%100%
   Mega.sol100%100%100%100%
   MegaPowerTwo.sol100%100%100%100%
   Micro.sol100%100%100%100%
   MicroPowerTwo.sol100%100%100%100%
   Milli.sol100%100%100%100%
   MilliPowerHalf.sol100%100%100%100%
   MilliPowerTwo.sol100%100%100%100%
   Nano.sol100%100%100%100%
   PowerHalf.sol100%100%100%100%
   PowerTwo.sol100%100%100%100%

@github-actions
Copy link

[Oracle] Integration Test Coverage Report

Coverage after merging britz-review-44 into main will be
78.62%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-oracle/contracts
   Oracle.sol37.50%35.29%41.67%38.10%110, 110, 110, 112–113, 113, 113, 115, 117, 117, 117–118, 125, 128–129, 129, 129, 131, 136, 136, 136–138, 20, 30, 37, 37–38, 40, 44–45, 52–53, 58, 63, 70, 70, 70–73, 73, 73–74, 76, 83, 88–89
   OracleFactory.sol58.33%40.63%70%73.33%103–105, 105, 105–106, 112, 112, 112–113, 33, 41, 48, 48–50, 57–59, 62, 73–75, 78, 85, 94–95
packages/perennial-oracle/contracts/interfaces
   IOracle.sol100%100%100%100%
   IOracleFactory.sol100%100%100%100%
   IPythFactory.sol100%100%100%100%
   IPythOracle.sol100%100%100%100%
packages/perennial-oracle/contracts/pyth
   PythFactory.sol89.29%72.73%100%100%106, 117, 44, 53, 60, 89
   PythOracle_Arbitrum.sol100%100%100%100%
   PythOracle_Optimism.sol100%100%100%100%
   PythOracle.sol98.35%95.83%100%100%132, 232

@github-actions
Copy link

[Core] Integration Test Coverage Report

Coverage after merging britz-review-44 into main will be
91.94%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial/contracts
   Market.sol75.32%53%88.57%85.55%100–101, 106, 113, 120–122, 131, 133, 133, 133–134, 134, 134–136, 136, 136–137, 137, 137, 139, 146, 146, 146, 148–150, 155, 157–158, 160–161, 257–259, 403, 449, 489–490, 490, 490, 490, 499–500, 505–506, 508, 508, 508–509, 513, 519–520, 520, 529, 529, 529, 533, 538, 549, 555–556, 582–583, 60, 640, 645, 83, 92, 99, 99
   MarketFactory.sol69.70%50%83.33%80%37, 48, 57–58, 64, 66, 72, 75–76
packages/perennial/contracts/interfaces
   IMarket.sol100%100%100%100%
   IMarketFactory.sol100%100%100%100%
   IOracleProvider.sol100%100%100%100%
   IOracleProviderFactory.sol100%100%100%100%
   IPayoffProvider.sol100%100%100%100%
packages/perennial/contracts/types
   Global.sol78.57%50%100%100%115–126
   Invalidation.sol60%100%66.67%57.14%28–30
   Local.sol80%56.25%83.33%95.65%128–133, 89, 97
   MarketParameter.sol69.57%40.91%100%95%113, 115–116, 118, 120, 122, 122, 122, 122, 134–138
   OracleVersion.sol100%100%100%100%
   Order.sol89.36%77.27%100%100%114–115, 129, 74, 80
   Position.sol83.23%56.25%94.12%95.89%147–148, 211, 229, 286, 398–400, 467–469, 498–510
   ProtocolParameter.sol75%50%100%100%60–61, 67–71
   RiskParameter.sol72.41%50%100%100%143, 148, 153, 155, 160, 162, 164, 166, 168, 170, 180–185
   Version.sol90.18%70.59%100%98.57%192–193, 362–370

@github-actions
Copy link

[Extensions] Integration Test Coverage Report

Coverage after merging britz-review-44 into main will be
99.31%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-extensions/contracts
   MultiInvoker.sol96.57%90.48%100%100%156, 225, 285, 299, 370, 388, 413, 462
packages/perennial-extensions/contracts/interfaces
   IMultiInvoker.sol100%100%100%100%
packages/perennial-extensions/contracts/types
   TriggerOrder.sol89.13%83.33%100%94.44%34–35, 62–64

@arjun-io arjun-io merged commit fe4c532 into main Sep 29, 2023
@arjun-io arjun-io deleted the britz-review-44 branch September 29, 2023 19:10
@github-actions
Copy link

[Vault] Integration Test Coverage Report

Coverage after merging britz-review-44 into main will be
99.03%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial-vault/contracts
   Vault.sol97.57%96.05%97.22%98.30%209, 209–212, 292
   VaultFactory.sol89.47%50%100%100%35, 48
packages/perennial-vault/contracts/interfaces
   IVault.sol100%100%100%100%
   IVaultFactory.sol100%100%100%100%
packages/perennial-vault/contracts/lib
   StrategyLib.sol100%100%100%100%
packages/perennial-vault/contracts/types
   Account.sol82.86%50%100%100%126–131
   Checkpoint.sol88.64%68.75%100%100%132, 186, 224–231
   Mapping.sol95.12%80%100%100%100, 95
   Registration.sol81.82%50%100%100%41–42
   VaultParameter.sol87.50%50%100%100%31

@github-actions
Copy link

[Core] Unit Test Coverage Report

Coverage after merging britz-review-44 into main will be
99.78%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/perennial/contracts
   Market.sol98.70%96%100%100%490, 490, 529, 83
   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%
   IPayoffProvider.sol100%100%100%100%
packages/perennial/contracts/types
   Global.sol100%100%100%100%
   Invalidation.sol100%100%100%100%
   Local.sol95.56%100%83.33%95.65%97
   MarketParameter.sol100%100%100%100%
   OracleVersion.sol100%100%100%100%
   Order.sol97.87%95.45%100%100%114
   Position.sol100%100%100%100%
   ProtocolParameter.sol100%100%100%100%
   RiskParameter.sol100%100%100%100%
   Version.sol100%100%100%100%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol change Modifies the protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants