Skip to content

Commit

Permalink
🏅 0xMacro Audit 10 Response
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredBorders authored Dec 1, 2023
2 parents 9b7a3ca + 21d0249 commit f6f8291
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 223 deletions.
43 changes: 22 additions & 21 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ Conditions:test_isPriceAbove() (gas: 19098)
Conditions:test_isPriceBelow() (gas: 19092)
Conditions:test_isTimestampAfter() (gas: 7711)
Conditions:test_isTimestampBefore() (gas: 7579)
DeploymentTest:test_deploy() (gas: 4835682)
DeploymentTest:test_deploy_oracle_zero_address() (gas: 1903169)
DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 1903085)
DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 1903152)
DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 1903165)
DeploymentTest:test_deploy_trusted_forwarder_zero_address() (gas: 37498)
Deposit:test_depositEth() (gas: 40987)
Deposit:test_depositEth_event() (gas: 42547)
Deposit:test_depositEth_fuzz(uint256,uint128) (runs: 256, μ: 39369, ~: 40409)
Deposit:test_depositEth_via_trustedForwarder() (gas: 68338)
Deposit:test_depositEth_via_trustedForwarder_value_mismatch() (gas: 73201)
Deposit:test_depositEth_via_trustedForwarder_value_mismatch_allow_failure() (gas: 72445)
DeploymentTest:test_deploy() (gas: 4890231)
DeploymentTest:test_deploy_oracle_zero_address() (gas: 1903233)
DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 1903149)
DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 1903216)
DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 1903229)
DeploymentTest:test_deploy_trusted_forwarder_zero_address() (gas: 37562)
Deposit:test_depositEth() (gas: 55255)
Deposit:test_depositEth_Account_Doesnt_Exist() (gas: 34271)
Deposit:test_depositEth_event() (gas: 56815)
Deposit:test_depositEth_fuzz(uint256,uint128) (runs: 256, μ: 36476, ~: 34889)
Deposit:test_depositEth_via_trustedForwarder() (gas: 85374)
Deposit:test_depositEth_via_trustedForwarder_value_mismatch() (gas: 87469)
Deposit:test_depositEth_via_trustedForwarder_value_mismatch_allow_failure() (gas: 86713)
DepositCollateral:test_depositCollateral() (gas: 258530)
DepositCollateral:test_depositCollateral_availableMargin() (gas: 266098)
DepositCollateral:test_depositCollateral_collateralAmount() (gas: 259106)
Expand All @@ -45,9 +46,9 @@ Execute:test_execute_CannotExecuteOrder_invalid_settlementStrategyId() (gas: 968
Execute:test_execute_CannotExecuteOrder_too_leveraged() (gas: 361524)
Execute:test_execute_event() (gas: 433933)
Execute:test_execute_order_committed() (gas: 430425)
Fee:test_fee_exceeds_account_credit() (gas: 53639)
Fee:test_fee_exceeds_maxExecutorFee() (gas: 53218)
Fee:test_fee_imposed() (gas: 465846)
Fee:test_fee_exceeds_account_credit() (gas: 67907)
Fee:test_fee_exceeds_maxExecutorFee() (gas: 67486)
Fee:test_fee_imposed() (gas: 468614)
MathLibTest:test_abs128() (gas: 448)
MathLibTest:test_abs256() (gas: 480)
MathLibTest:test_castU128() (gas: 350)
Expand All @@ -73,12 +74,12 @@ VerifySignature:test_verifySignature(uint256) (runs: 256, μ: 24402, ~: 24402)
VerifySignature:test_verifySignature_false_private_key() (gas: 27079)
VerifySigner:test_verifySigner() (gas: 25862)
VerifySigner:test_verifySigner_false() (gas: 28614)
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: 49576)
Withdraw:test_withdrawEth_fuzz(uint256) (runs: 256, μ: 68193, ~: 68743)
Withdraw:test_withdrawEth() (gas: 52547)
Withdraw:test_withdrawEth_EthTransferFailed() (gas: 93091)
Withdraw:test_withdrawEth_InsufficientEthBalance() (gas: 59781)
Withdraw:test_withdrawEth_Unauthorized() (gas: 59420)
Withdraw:test_withdrawEth_event() (gas: 51791)
Withdraw:test_withdrawEth_fuzz(uint256) (runs: 256, μ: 70961, ~: 71511)
WithdrawCollateral:test_withdrawCollateral() (gas: 353254)
WithdrawCollateral:test_withdrawCollateral_availableMargin() (gas: 354755)
WithdrawCollateral:test_withdrawCollateral_collateralAmount() (gas: 353747)
Expand Down
Loading

0 comments on commit f6f8291

Please sign in to comment.