Skip to content

Commit

Permalink
Merge branch 'omniscia-audit-response' of github.com:Kwenta/smart-mar…
Browse files Browse the repository at this point in the history
…gin-v3 into omniscia-audit-response
  • Loading branch information
JaredBorders committed Sep 19, 2023
2 parents ee62831 + 711b795 commit 11d2693
Show file tree
Hide file tree
Showing 13 changed files with 426 additions and 333 deletions.
128 changes: 63 additions & 65 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,72 +1,70 @@
AccountDelegate:test_isAccountDelegate_account_doesnt_exist() (gas: 26446)
AccountDelegate:test_isAccountDelegate_false() (gas: 391888)
AccountDelegate:test_isAccountDelegate_true() (gas: 389857)
AccountOwner:test_isAccountOwner_account_doesnt_exist() (gas: 25010)
AccountOwner:test_isAccountOwner_false() (gas: 229778)
AccountOwner:test_isAccountOwner_true() (gas: 229768)
CanExecute:test_canExecute_false_nonce_used() (gas: 623045)
CanExecute:test_canExecute_false_trusted_executor() (gas: 43930)
CanExecute:test_canExecute_true() (gas: 43529)
CommitOrder:test_commitOrder() (gas: 378313)
CommitOrder:test_commitOrder_insufficient_collateral() (gas: 433243)
CommitOrder:test_commitOrder_invalid_market() (gas: 37323)
AccountDelegate:test_isAccountDelegate_account_doesnt_exist() (gas: 26494)
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: 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: 168974)
Conditions:test_isPositionSizeAbove() (gas: 18735)
Conditions:test_isPositionSizeBelow() (gas: 18717)
Conditions:test_isPriceAbove() (gas: 19106)
Conditions:test_isPriceBelow() (gas: 19178)
Conditions:test_isTimestampAfter() (gas: 7579)
Conditions:test_isTimestampBefore() (gas: 7602)
DeploymentTest:test_deploy() (gas: 2506808)
DeploymentTest:test_deploy_oracle_zero_address() (gas: 39663)
DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 39559)
DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 39637)
DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 39650)
DepositCollateral:test_depositCollateral() (gas: 258394)
DepositCollateral:test_depositCollateral_availableMargin() (gas: 265951)
DepositCollateral:test_depositCollateral_collateralAmount() (gas: 258970)
DepositCollateral:test_depositCollateral_insufficient_balance() (gas: 55935)
DepositCollateral:test_depositCollateral_totalCollateralValue() (gas: 263324)
Execute:test_execute_CannotExecuteOrder() (gas: 38987)
Execute:test_execute_leverage_exceeded() (gas: 693504)
Execute:test_execute_order_committed() (gas: 621047)
Fee:test_fee_imposed() (gas: 627144)
Fee:test_fee_imposed_above_upper_fee_cap() (gas: 603844)
Fee:test_fee_imposed_at_upper_fee_cap() (gas: 603747)
Fee:test_fee_imposed_below_lower_fee_cap() (gas: 602161)
Fee:test_fee_imposed_below_upper_fee_cap() (gas: 604725)
Fee:test_fee_imposed_fee_cannot_be_paid() (gas: 377994)
Fee:test_fee_imposed_insufficient_collateral_for_order() (gas: 693505)
Conditions:test_isOrderFeeBelow() (gas: 168839)
Conditions:test_isPositionSizeAbove() (gas: 18801)
Conditions:test_isPositionSizeBelow() (gas: 18783)
Conditions:test_isPriceAbove() (gas: 19194)
Conditions:test_isPriceBelow() (gas: 18998)
Conditions:test_isTimestampAfter() (gas: 7645)
Conditions:test_isTimestampBefore() (gas: 7668)
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: 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, μ: 576, ~: 603)
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: 600378)
NonceBitmap:test_hasUnorderedNonceBeenUsed() (gas: 53961)
NonceBitmap:test_invalidateUnorderedNonces() (gas: 72637)
NonceBitmap:test_invalidateUnorderedNonces_Only_Owner_Delegate() (gas: 190324)
ReduceOnly:test_reduce_only() (gas: 622681)
ReduceOnly:test_reduce_only_same_sign() (gas: 68300)
ReduceOnly:test_reduce_only_truncate_size_down() (gas: 622811)
ReduceOnly:test_reduce_only_truncate_size_up() (gas: 603624)
ReduceOnly:test_reduce_only_zero_size() (gas: 158516)
VerifyConditions:test_max_condition_size_exceeded() (gas: 45024)
VerifyConditions:test_verifyConditions_internal_non_condition_getSynthAddress() (gas: 10854)
VerifyConditions:test_verifyConditions_modify_state_createAccount() (gas: 10684)
VerifyConditions:test_verifyConditions_public_non_condition_isAccountDelegate() (gas: 28334)
VerifyConditions:test_verify_conditions_not_verified() (gas: 26803)
VerifyConditions:test_verify_conditions_verified() (gas: 129680)
VerifySignature:test_verifySignature() (gas: 23724)
VerifySignature:test_verifySignature_false_private_key() (gas: 26546)
VerifySigner:test_verifySigner() (gas: 25787)
VerifySigner:test_verifySigner_false() (gas: 28896)
WithdrawCollateral:test_withdrawCollateral() (gas: 348350)
WithdrawCollateral:test_withdrawCollateral_availableMargin() (gas: 349860)
WithdrawCollateral:test_withdrawCollateral_collateralAmount() (gas: 348860)
WithdrawCollateral:test_withdrawCollateral_insufficient_account_collateral_balance() (gas: 279608)
WithdrawCollateral:test_withdrawCollateral_totalCollateralValue() (gas: 349349)
WithdrawCollateral:test_withdrawCollateral_zero() (gas: 265953)
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: 25801)
VerifySigner:test_verifySigner_false() (gas: 28509)
WithdrawCollateral:test_withdrawCollateral() (gas: 348278)
WithdrawCollateral:test_withdrawCollateral_availableMargin() (gas: 349788)
WithdrawCollateral:test_withdrawCollateral_collateralAmount() (gas: 348788)
WithdrawCollateral:test_withdrawCollateral_insufficient_account_collateral_balance() (gas: 279518)
WithdrawCollateral:test_withdrawCollateral_totalCollateralValue() (gas: 349277)
WithdrawCollateral:test_withdrawCollateral_zero() (gas: 265863)
3 changes: 3 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- "test"
- "script"
Loading

0 comments on commit 11d2693

Please sign in to comment.