Skip to content

Commit

Permalink
馃弲 Macro audit response
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredBorders committed Sep 17, 2023
2 parents c302121 + 69ed844 commit 711b795
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 212 deletions.
68 changes: 34 additions & 34 deletions .gas-snapshot
@@ -1,15 +1,15 @@
AccountDelegate:test_isAccountDelegate_account_doesnt_exist() (gas: 26494)
AccountDelegate:test_isAccountDelegate_false() (gas: 391958)
AccountDelegate:test_isAccountDelegate_true() (gas: 389927)
AccountDelegate:test_isAccountDelegate_false() (gas: 391959)
AccountDelegate:test_isAccountDelegate_true() (gas: 389928)
AccountOwner:test_isAccountOwner_account_doesnt_exist() (gas: 25032)
AccountOwner:test_isAccountOwner_false() (gas: 229800)
AccountOwner:test_isAccountOwner_true() (gas: 229790)
CanExecute:test_canExecute_false_nonce_used() (gas: 623091)
CanExecute:test_canExecute_false_trusted_executor() (gas: 43976)
CanExecute:test_canExecute_true() (gas: 43575)
CommitOrder:test_commitOrder() (gas: 378335)
CommitOrder:test_commitOrder_insufficient_collateral() (gas: 433265)
CommitOrder:test_commitOrder_invalid_market() (gas: 37345)
CanExecute:test_canExecute_false_nonce_used() (gas: 623164)
CanExecute:test_canExecute_false_trusted_executor() (gas: 44049)
CanExecute:test_canExecute_true() (gas: 43648)
CommitOrder:test_commitOrder() (gas: 378408)
CommitOrder:test_commitOrder_insufficient_collateral() (gas: 433338)
CommitOrder:test_commitOrder_invalid_market() (gas: 37418)
Conditions:test_isMarketOpen() (gas: 26784)
Conditions:test_isOrderFeeBelow() (gas: 168839)
Conditions:test_isPositionSizeAbove() (gas: 18801)
Expand All @@ -18,50 +18,50 @@ Conditions:test_isPriceAbove() (gas: 19194)
Conditions:test_isPriceBelow() (gas: 18998)
Conditions:test_isTimestampAfter() (gas: 7645)
Conditions:test_isTimestampBefore() (gas: 7668)
DeploymentTest:test_deploy() (gas: 2653558)
DeploymentTest:test_deploy_oracle_zero_address() (gas: 39840)
DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 39736)
DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 39814)
DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 39827)
DeploymentTest:test_deploy() (gas: 2684850)
DeploymentTest:test_deploy_oracle_zero_address() (gas: 39879)
DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 39775)
DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 39853)
DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 39866)
DepositCollateral:test_depositCollateral() (gas: 258349)
DepositCollateral:test_depositCollateral_availableMargin() (gas: 265906)
DepositCollateral:test_depositCollateral_collateralAmount() (gas: 258925)
DepositCollateral:test_depositCollateral_insufficient_balance() (gas: 55890)
DepositCollateral:test_depositCollateral_totalCollateralValue() (gas: 263279)
Execute:test_execute_CannotExecuteOrder() (gas: 39009)
Execute:test_execute_leverage_exceeded() (gas: 697970)
Execute:test_execute_order_committed() (gas: 621071)
Fee:test_fee_imposed() (gas: 627168)
Fee:test_fee_imposed_above_upper_fee_cap() (gas: 608109)
Fee:test_fee_imposed_at_upper_fee_cap() (gas: 608012)
Fee:test_fee_imposed_below_lower_fee_cap() (gas: 606659)
Fee:test_fee_imposed_below_upper_fee_cap() (gas: 608932)
Fee:test_fee_imposed_fee_cannot_be_paid() (gas: 382415)
Fee:test_fee_imposed_insufficient_collateral_for_order() (gas: 697971)
Execute:test_execute_CannotExecuteOrder() (gas: 36391)
Execute:test_execute_leverage_exceeded() (gas: 698043)
Execute:test_execute_order_committed() (gas: 621144)
Fee:test_fee_imposed() (gas: 627241)
Fee:test_fee_imposed_above_upper_fee_cap() (gas: 608182)
Fee:test_fee_imposed_at_upper_fee_cap() (gas: 608085)
Fee:test_fee_imposed_below_lower_fee_cap() (gas: 606732)
Fee:test_fee_imposed_below_upper_fee_cap() (gas: 609005)
Fee:test_fee_imposed_fee_cannot_be_paid() (gas: 382488)
Fee:test_fee_imposed_insufficient_collateral_for_order() (gas: 698044)
MathLibTest:test_abs128() (gas: 448)
MathLibTest:test_abs256() (gas: 480)
MathLibTest:test_castU128() (gas: 350)
MathLibTest:test_castU128_overflow() (gas: 3509)
MathLibTest:test_fuzz_abs128(int128) (runs: 256, 渭: 577, ~: 603)
MathLibTest:test_fuzz_abs256(int256) (runs: 256, 渭: 472, ~: 458)
MathLibTest:test_isSameSign() (gas: 999)
MulticallableTest:test_multicall_depositCollateral_commitOrder() (gas: 600377)
NonceBitmap:test_hasUnorderedNonceBeenUsed() (gas: 53827)
NonceBitmap:test_invalidateUnorderedNonces() (gas: 72661)
NonceBitmap:test_invalidateUnorderedNonces_Only_Owner_Delegate() (gas: 190194)
ReduceOnly:test_reduce_only() (gas: 622705)
ReduceOnly:test_reduce_only_same_sign() (gas: 68324)
ReduceOnly:test_reduce_only_truncate_size_down() (gas: 622835)
ReduceOnly:test_reduce_only_truncate_size_up() (gas: 603648)
ReduceOnly:test_reduce_only_zero_size() (gas: 158540)
MulticallableTest:test_multicall_depositCollateral_commitOrder() (gas: 600450)
NonceBitmap:test_hasUnorderedNonceBeenUsed() (gas: 53903)
NonceBitmap:test_invalidateUnorderedNonces() (gas: 72810)
NonceBitmap:test_invalidateUnorderedNonces_Only_Owner_Delegate() (gas: 189948)
ReduceOnly:test_reduce_only() (gas: 622778)
ReduceOnly:test_reduce_only_same_sign() (gas: 68397)
ReduceOnly:test_reduce_only_truncate_size_down() (gas: 622908)
ReduceOnly:test_reduce_only_truncate_size_up() (gas: 603721)
ReduceOnly:test_reduce_only_zero_size() (gas: 158613)
VerifyConditions:test_max_condition_size_exceeded() (gas: 45046)
VerifyConditions:test_verifyConditions_InvalidConditionSelector() (gas: 14079)
VerifyConditions:test_verify_conditions_not_verified() (gas: 29659)
VerifyConditions:test_verify_conditions_verified() (gas: 135662)
VerifySignature:test_verifySignature() (gas: 23770)
VerifySignature:test_verifySignature_false_private_key() (gas: 26592)
VerifySigner:test_verifySigner() (gas: 25722)
VerifySigner:test_verifySigner_false() (gas: 28831)
VerifySigner:test_verifySigner() (gas: 25801)
VerifySigner:test_verifySigner_false() (gas: 28509)
WithdrawCollateral:test_withdrawCollateral() (gas: 348278)
WithdrawCollateral:test_withdrawCollateral_availableMargin() (gas: 349788)
WithdrawCollateral:test_withdrawCollateral_collateralAmount() (gas: 348788)
Expand Down

0 comments on commit 711b795

Please sign in to comment.