Skip to content

Commit

Permalink
πŸ‘·πŸ»β€β™‚οΈ Refactor Engine & Improve Condition Selector Check
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredBorders committed Sep 15, 2023
1 parent cacdee0 commit 927bdd7
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 320 deletions.
50 changes: 25 additions & 25 deletions .gas-snapshot
Expand Up @@ -4,40 +4,40 @@ AccountDelegate:test_isAccountDelegate_true() (gas: 389927)
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: 623113)
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)
Conditions:test_isMarketOpen() (gas: 26828)
Conditions:test_isMarketOpen() (gas: 26784)
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: 2743471)
DeploymentTest:test_deploy_oracle_zero_address() (gas: 39821)
DeploymentTest:test_deploy_perps_market_proxy_zero_address() (gas: 39717)
DeploymentTest:test_deploy_spot_market_proxy_zero_address() (gas: 39795)
DeploymentTest:test_deploy_susd_proxy_zero_address() (gas: 39808)
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)
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: 39031)
Execute:test_execute_leverage_exceeded() (gas: 698025)
Execute:test_execute_order_committed() (gas: 621093)
Fee:test_fee_imposed() (gas: 627190)
Fee:test_fee_imposed_above_upper_fee_cap() (gas: 608356)
Fee:test_fee_imposed_at_upper_fee_cap() (gas: 608259)
Fee:test_fee_imposed_below_lower_fee_cap() (gas: 606657)
Fee:test_fee_imposed_below_upper_fee_cap() (gas: 609212)
Fee:test_fee_imposed_fee_cannot_be_paid() (gas: 382470)
Fee:test_fee_imposed_insufficient_collateral_for_order() (gas: 698026)
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)
MathLibTest:test_abs128() (gas: 448)
MathLibTest:test_abs256() (gas: 480)
MathLibTest:test_castU128() (gas: 350)
Expand All @@ -49,15 +49,15 @@ 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: 622727)
ReduceOnly:test_reduce_only_same_sign() (gas: 68346)
ReduceOnly:test_reduce_only_truncate_size_down() (gas: 622857)
ReduceOnly:test_reduce_only_truncate_size_up() (gas: 603670)
ReduceOnly:test_reduce_only_zero_size() (gas: 158562)
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)
VerifyConditions:test_max_condition_size_exceeded() (gas: 45046)
VerifyConditions:test_verifyConditions_InvalidConditionSelector() (gas: 16013)
VerifyConditions:test_verify_conditions_not_verified() (gas: 37769)
VerifyConditions:test_verify_conditions_verified() (gas: 151632)
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)
Expand Down

0 comments on commit 927bdd7

Please sign in to comment.