From 39176d13c9e232d6fd96fdf7c052388c63c0a1b1 Mon Sep 17 00:00:00 2001 From: JaredBorders Date: Thu, 12 Oct 2023 20:19:19 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=B8=20Update=20gas-snapshot/lcov?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gas-snapshot | 55 ++++++----- lcov.info | 252 +++++++++++++++++++++++++++----------------------- 2 files changed, 168 insertions(+), 139 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index d8c1493b..a521275b 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -4,19 +4,19 @@ AccountDelegate:test_isAccountDelegate_true() (gas: 389960) AccountOwner:test_isAccountOwner_account_doesnt_exist() (gas: 25010) AccountOwner:test_isAccountOwner_false() (gas: 229790) AccountOwner:test_isAccountOwner_true() (gas: 229780) -CanExecute:test_canExecute_false_nonce_used() (gas: 428875) -CanExecute:test_canExecute_false_trusted_executor() (gas: 46671) -CanExecute:test_canExecute_true() (gas: 46359) -CommitOrder:test_commitOrder() (gas: 382988) -CommitOrder:test_commitOrder_insufficient_collateral() (gas: 441169) -CommitOrder:test_commitOrder_invalid_market() (gas: 38373) -Conditions:test_isMarketOpen() (gas: 26586) -Conditions:test_isOrderFeeBelow() (gas: 179781) +CanExecute:test_canExecute_false_nonce_used() (gas: 428892) +CanExecute:test_canExecute_false_trusted_executor() (gas: 46667) +CanExecute:test_canExecute_true() (gas: 46355) +CommitOrder:test_commitOrder() (gas: 382966) +CommitOrder:test_commitOrder_insufficient_collateral() (gas: 441236) +CommitOrder:test_commitOrder_invalid_market() (gas: 38351) +Conditions:test_isMarketOpen() (gas: 26619) +Conditions:test_isOrderFeeBelow() (gas: 179759) Conditions:test_isPositionSizeAbove() (gas: 18801) -Conditions:test_isPositionSizeBelow() (gas: 18762) -Conditions:test_isPriceAbove() (gas: 19054) +Conditions:test_isPositionSizeBelow() (gas: 18740) +Conditions:test_isPriceAbove() (gas: 19098) Conditions:test_isPriceBelow() (gas: 19070) -Conditions:test_isTimestampAfter() (gas: 7711) +Conditions:test_isTimestampAfter() (gas: 7734) Conditions:test_isTimestampBefore() (gas: 7602) DeploymentTest:test_deploy() (gas: 2960716) DeploymentTest:test_deploy_oracle_zero_address() (gas: 40388) @@ -24,16 +24,22 @@ DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 40306) DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 40362) DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 40375) DeploymentTest:test_deploy_trusted_forwarder_zero_address() (gas: 40422) +Deposit:test_depositEth() (gas: 40953) +Deposit:test_depositEth_event() (gas: 42502) +Deposit:test_depositEth_fuzz(uint256,uint128) (runs: 256, μ: 39335, ~: 40375) DepositCollateral:test_depositCollateral() (gas: 258552) DepositCollateral:test_depositCollateral_availableMargin() (gas: 266120) DepositCollateral:test_depositCollateral_collateralAmount() (gas: 259128) DepositCollateral:test_depositCollateral_insufficient_balance() (gas: 56068) DepositCollateral:test_depositCollateral_totalCollateralValue() (gas: 263504) -EIP7412Test:test_fulfillOracleQuery(bytes) (runs: 256, μ: 142463, ~: 142365) -Execute:test_execute_CannotExecuteOrder() (gas: 39723) -Execute:test_execute_leverage_exceeded() (gas: 207) -Execute:test_execute_order_committed() (gas: 426275) -Fee:test_fee_imposed() (gas: 186) +EIP7412Test:test_fulfillOracleQuery(bytes) (runs: 256, μ: 142507, ~: 142409) +Execute:test_execute_CannotExecuteOrder_invalid_acceptablePrice() (gas: 330567) +Execute:test_execute_CannotExecuteOrder_invalid_settlementStrategyId() (gas: 96441) +Execute:test_execute_CannotExecuteOrder_too_leveraged() (gas: 361140) +Execute:test_execute_order_committed() (gas: 426297) +Fee:test_fee_exceeds_account_credit() (gas: 53436) +Fee:test_fee_exceeds_maxExecutorFee() (gas: 53037) +Fee:test_fee_imposed() (gas: 461740) MathLibTest:test_abs128() (gas: 448) MathLibTest:test_abs256() (gas: 480) MathLibTest:test_castU128() (gas: 350) @@ -46,19 +52,26 @@ NonceBitmapTest:test_fuzz_invalidateUnorderedNonces(uint256) (runs: 256, μ: 527 NonceBitmapTest:test_hasUnorderedNonceBeenUsed() (gas: 54126) NonceBitmapTest:test_invalidateUnorderedNonces() (gas: 76152) NonceBitmapTest:test_invalidateUnorderedNonces_Only_Owner_Delegate() (gas: 190324) -ReduceOnly:test_reduce_only() (gas: 427974) +NonceBitmapTest:test_invalidateUnorderedNonces_event() (gas: 53464) +ReduceOnly:test_reduce_only() (gas: 427997) ReduceOnly:test_reduce_only_same_sign() (gas: 72070) ReduceOnly:test_reduce_only_truncate_size_down() (gas: 428104) ReduceOnly:test_reduce_only_truncate_size_up() (gas: 404766) ReduceOnly:test_reduce_only_zero_size() (gas: 162587) -VerifyConditions:test_max_condition_size_exceeded() (gas: 45057) -VerifyConditions:test_verifyConditions_InvalidConditionSelector() (gas: 14154) -VerifyConditions:test_verify_conditions_not_verified() (gas: 29729) +VerifyConditions:test_max_condition_size_exceeded() (gas: 45101) +VerifyConditions:test_verifyConditions_InvalidConditionSelector() (gas: 14132) +VerifyConditions:test_verify_conditions_not_verified() (gas: 29707) VerifyConditions:test_verify_conditions_verified() (gas: 135835) -VerifySignature:test_verifySignature() (gas: 23917) +VerifySignature:test_verifySignature() (gas: 23895) VerifySignature:test_verifySignature_false_private_key() (gas: 26738) VerifySigner:test_verifySigner() (gas: 25908) VerifySigner:test_verifySigner_false() (gas: 28616) +Withdraw:test_withdrawEth() (gas: 50332) +Withdraw:test_withdrawEth_EthTransferFailed() (gas: 78823) +Withdraw:test_withdrawEth_InsufficientEthBalance() (gas: 57013) +Withdraw:test_withdrawEth_Unauthorized() (gas: 56652) +Withdraw:test_withdrawEth_event() (gas: 49594) +Withdraw:test_withdrawEth_fuzz(uint256) (runs: 256, μ: 68170, ~: 68720) WithdrawCollateral:test_withdrawCollateral() (gas: 353272) WithdrawCollateral:test_withdrawCollateral_availableMargin() (gas: 354790) WithdrawCollateral:test_withdrawCollateral_collateralAmount() (gas: 353782) diff --git a/lcov.info b/lcov.info index 647a379e..eeda1e5b 100644 --- a/lcov.info +++ b/lcov.info @@ -1,32 +1,32 @@ TN: SF:script/Deploy.s.sol -FN:98,DeployOptimismGoerli.run -FNDA:0,DeployOptimismGoerli.run -DA:99,0 -DA:100,0 -DA:102,0 -DA:110,0 -FN:38,DeployBase.run -FNDA:0,DeployBase.run -DA:39,0 -DA:40,0 -DA:42,0 -DA:50,0 +FN:78,DeployOptimism.run +FNDA:0,DeployOptimism.run +DA:79,0 +DA:80,0 +DA:82,0 +DA:90,0 FN:58,DeployBaseGoerli.run FNDA:0,DeployBaseGoerli.run DA:59,0 DA:60,0 DA:62,0 DA:70,0 +FN:38,DeployBase.run +FNDA:0,DeployBase.run +DA:39,0 +DA:40,0 +DA:42,0 +DA:50,0 +FN:98,DeployOptimismGoerli.run +FNDA:0,DeployOptimismGoerli.run +DA:99,0 +DA:100,0 +DA:102,0 +DA:110,0 FN:17,Setup.deploySystem FNDA:0,Setup.deploySystem DA:24,0 -FN:78,DeployOptimism.run -FNDA:0,DeployOptimism.run -DA:79,0 -DA:80,0 -DA:82,0 -DA:90,0 FNF:5 FNH:0 LF:17 @@ -38,60 +38,60 @@ TN: SF:src/Engine.sol FN:124,Engine.isAccountOwner FNDA:3,Engine.isAccountOwner -DA:130,9 +DA:130,270 FN:134,Engine.isAccountDelegate FNDA:2,Engine.isAccountDelegate DA:140,2 FN:145,Engine._isAccountOwnerOrDelegate -FNDA:277,Engine._isAccountOwnerOrDelegate -DA:150,277 +FNDA:281,Engine._isAccountOwnerOrDelegate +DA:150,281 FN:168,Engine.depositEth -FNDA:0,Engine.depositEth -DA:169,0 -DA:171,0 +FNDA:522,Engine.depositEth +DA:169,522 +DA:171,522 FN:175,Engine.withdrawEth -FNDA:0,Engine.withdrawEth -DA:179,0 -DA:181,0 -BRDA:181,0,0,- -BRDA:181,0,1,- -DA:183,0 -DA:185,0 +FNDA:261,Engine.withdrawEth +DA:179,261 +DA:181,261 +BRDA:181,0,0,1 +BRDA:181,0,1,260 +DA:183,260 +DA:185,258 FN:192,Engine._withdrawEth -FNDA:7,Engine._withdrawEth -DA:197,7 -BRDA:197,1,0,- -BRDA:197,1,1,7 -DA:199,7 -DA:201,7 -DA:203,7 -BRDA:203,2,0,- -BRDA:203,2,1,7 +FNDA:271,Engine._withdrawEth +DA:197,271 +BRDA:197,1,0,1 +BRDA:197,1,1,270 +DA:199,270 +DA:201,270 +DA:203,270 +BRDA:203,2,0,1 +BRDA:203,2,1,269 FN:211,Engine.invalidateUnorderedNonces -FNDA:260,Engine.invalidateUnorderedNonces -DA:216,260 -BRDA:216,3,0,260 +FNDA:261,Engine.invalidateUnorderedNonces +DA:216,261 +BRDA:216,3,0,261 BRDA:216,3,1,- -DA:222,260 -DA:224,260 +DA:222,261 +DA:224,261 DA:226,0 FN:231,Engine.hasUnorderedNonceBeenUsed FNDA:260,Engine.hasUnorderedNonceBeenUsed -DA:237,273 -DA:241,273 -DA:255,273 +DA:237,276 +DA:241,276 +DA:255,276 FN:265,Engine._bitmapPositions -FNDA:280,Engine._bitmapPositions -DA:272,280 -DA:276,280 +FNDA:287,Engine._bitmapPositions +DA:272,287 +DA:276,287 FN:282,Engine._useUnorderedNonce -FNDA:7,Engine._useUnorderedNonce -DA:283,7 -DA:287,7 -DA:294,7 -DA:314,7 +FNDA:11,Engine._useUnorderedNonce +DA:283,11 +DA:287,11 +DA:294,11 +DA:314,11 BRDA:314,4,0,- -BRDA:314,4,1,7 +BRDA:314,4,1,11 FN:322,Engine.modifyCollateral FNDA:18,Engine.modifyCollateral DA:327,18 @@ -124,17 +124,17 @@ BRDA:403,7,1,- DA:404,4 DA:414,0 FN:418,Engine._commitOrder -FNDA:9,Engine._commitOrder -DA:427,9 +FNDA:13,Engine._commitOrder +DA:427,13 FN:445,Engine.execute -FNDA:8,Engine.execute -DA:460,8 -BRDA:460,8,0,1 -BRDA:460,8,1,7 -DA:463,7 -DA:469,7 -DA:473,7 -DA:476,7 +FNDA:13,Engine.execute +DA:460,13 +BRDA:460,8,0,2 +BRDA:460,8,1,11 +DA:463,11 +DA:469,11 +DA:473,11 +DA:476,11 BRDA:476,9,0,2 BRDA:476,9,1,3 DA:477,5 @@ -150,41 +150,41 @@ DA:494,3 BRDA:494,12,0,2 BRDA:494,12,1,3 DA:504,2 -DA:509,5 +DA:509,9 FN:521,Engine.canExecute FNDA:5,Engine.canExecute -DA:527,13 -BRDA:527,13,0,- -BRDA:527,13,1,13 -DA:530,13 -BRDA:530,14,0,- -BRDA:530,14,1,13 -DA:533,13 +DA:527,18 +BRDA:527,13,0,1 +BRDA:527,13,1,17 +DA:530,17 +BRDA:530,14,0,1 +BRDA:530,14,1,16 +DA:533,16 BRDA:533,15,0,2 -BRDA:533,15,1,11 +BRDA:533,15,1,14 DA:534,2 -DA:538,11 -BRDA:538,16,0,1 -BRDA:538,16,1,10 -DA:541,10 +DA:538,14 +BRDA:538,16,0,- +BRDA:538,16,1,14 +DA:541,14 BRDA:541,17,0,- -BRDA:541,17,1,10 -DA:544,10 +BRDA:541,17,1,14 +DA:544,14 BRDA:544,18,0,- BRDA:544,18,1,- DA:547,0 BRDA:547,19,0,- BRDA:547,19,1,- -DA:551,10 +DA:551,14 BRDA:551,20,0,1 -BRDA:551,20,1,9 -DA:554,9 +BRDA:551,20,1,13 +DA:554,13 FN:562,Engine.verifySigner FNDA:2,Engine.verifySigner -DA:568,13 +DA:568,16 FN:572,Engine.verifySignature FNDA:2,Engine.verifySignature -DA:576,12 +DA:576,16 FN:582,Engine.verifyConditions FNDA:4,Engine.verifyConditions DA:588,4 @@ -245,11 +245,11 @@ FNDA:4,Engine.isOrderFeeBelow DA:722,4 DA:727,4 FNF:29 -FNH:27 +FNH:29 LF:102 -LH:93 +LH:99 BRF:48 -BRH:33 +BRH:38 end_of_record TN: SF:src/libraries/ConditionalOrderHashLib.sol @@ -313,20 +313,20 @@ FNDA:0,EIP712._domainNameAndVersion DA:74,0 DA:75,0 FN:80,EIP712.DOMAIN_SEPARATOR -FNDA:13,EIP712.DOMAIN_SEPARATOR -DA:81,13 -DA:82,13 +FNDA:18,EIP712.DOMAIN_SEPARATOR +DA:81,18 +DA:82,18 BRDA:82,0,0,- -BRDA:82,0,1,13 +BRDA:82,0,1,18 DA:83,0 FN:100,EIP712._hashTypedData -FNDA:12,EIP712._hashTypedData -DA:105,12 -DA:106,12 +FNDA:16,EIP712._hashTypedData +DA:105,16 +DA:106,16 BRDA:106,1,0,- -BRDA:106,1,1,12 +BRDA:106,1,1,16 DA:107,0 -DA:115,12 +DA:115,16 FN:127,EIP712.eip712Domain FNDA:0,EIP712.eip712Domain DA:140,0 @@ -341,10 +341,10 @@ DA:154,0 DA:155,0 DA:164,0 FN:169,EIP712._cachedDomainSeparatorInvalidated -FNDA:25,EIP712._cachedDomainSeparatorInvalidated -DA:174,25 -DA:175,25 -DA:178,25 +FNDA:34,EIP712._cachedDomainSeparatorInvalidated +DA:174,34 +DA:175,34 +DA:178,34 FNF:6 FNH:3 LF:21 @@ -368,17 +368,17 @@ TN: SF:src/utils/ERC2771Context.sol FN:52,ERC2771Context.trustedForwarder FNDA:0,ERC2771Context.trustedForwarder -DA:53,299 +DA:53,569 FN:59,ERC2771Context.isTrustedForwarder FNDA:0,ERC2771Context.isTrustedForwarder -DA:60,299 +DA:60,569 FN:68,ERC2771Context._msgSender -FNDA:299,ERC2771Context._msgSender -DA:69,299 +FNDA:569,ERC2771Context._msgSender +DA:69,569 BRDA:69,0,0,- -BRDA:69,0,1,299 +BRDA:69,0,1,569 DA:73,0 -DA:76,299 +DA:76,569 FN:85,ERC2771Context._msgData FNDA:0,ERC2771Context._msgData DA:86,0 @@ -387,8 +387,8 @@ BRDA:86,1,1,- DA:87,0 DA:89,0 FN:16,Context._msgSender -FNDA:299,Context._msgSender -DA:17,299 +FNDA:569,Context._msgSender +DA:17,569 FN:20,Context._msgData FNDA:0,Context._msgData DA:21,0 @@ -481,17 +481,30 @@ BRF:0 BRH:0 end_of_record TN: +SF:test/EthManagement.t.sol +FN:11,EthManagementTest.setUp +FNDA:0,EthManagementTest.setUp +DA:12,0 +DA:13,0 +FNF:1 +FNH:0 +LF:2 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: SF:test/utils/Bootstrap.sol -FN:104,BootstrapOptimism.init -FNDA:0,BootstrapOptimism.init -DA:108,0 -DA:116,0 -DA:124,0 FN:136,BootstrapOptimismGoerli.init FNDA:0,BootstrapOptimismGoerli.init DA:140,0 DA:148,0 DA:156,0 +FN:104,BootstrapOptimism.init +FNDA:0,BootstrapOptimism.init +DA:108,0 +DA:116,0 +DA:124,0 FN:38,Bootstrap.initializeOptimismGoerli FNDA:0,Bootstrap.initializeOptimismGoerli DA:39,0 @@ -640,9 +653,12 @@ DA:45,0 FN:54,SynthetixMock.mock_fulfillOracleQuery FNDA:0,SynthetixMock.mock_fulfillOracleQuery DA:58,0 -FNF:4 +FN:67,SynthetixMock.mock_getAccountOwner +FNDA:0,SynthetixMock.mock_getAccountOwner +DA:72,0 +FNF:5 FNH:0 -LF:4 +LF:5 LH:0 BRF:0 BRH:0