Skip to content

Commit

Permalink
✅ Add SignatureCheckerLib & EIP712 Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredBorders authored Mar 27, 2024
2 parents 0d48db6 + 1a66951 commit 6bf2ebb
Show file tree
Hide file tree
Showing 6 changed files with 531 additions and 128 deletions.
28 changes: 14 additions & 14 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Conditions:test_isPriceAbove() (gas: 175814)
Conditions:test_isPriceBelow() (gas: 175643)
Conditions:test_isTimestampAfter() (gas: 13288)
Conditions:test_isTimestampBefore() (gas: 13376)
Credit:test_credit(uint256) (runs: 256, μ: 94496, ~: 105108)
Credit:test_credit(uint256) (runs: 256, μ: 94630, ~: 105108)
Credit:test_credit_event() (gas: 88151)
Credit:test_credit_zap() (gas: 677111)
Debit:test_debit(uint256) (runs: 256, μ: 136670, ~: 147259)
Debit:test_debit(uint256) (runs: 256, μ: 136580, ~: 147259)
Debit:test_debit_InsufficientBalance() (gas: 122814)
Debit:test_debit_Unauthorized() (gas: 122831)
Debit:test_debit_event() (gas: 104507)
Expand All @@ -45,13 +45,12 @@ DepositCollateral:test_depositCollateral_collateralAmount() (gas: 433843)
DepositCollateral:test_depositCollateral_insufficient_balance() (gas: 61158)
DepositCollateral:test_depositCollateral_totalCollateralValue() (gas: 435519)
DepositCollateral:test_depositCollateral_zap() (gas: 940531)
EIP712Test:test_DOMAIN_SEPARATOR() (gas: 165)
EIP712Test:test_buildDomainSeparator() (gas: 165)
EIP712Test:test_cachedDomainSeparatorInvalidated() (gas: 144)
EIP712Test:test_constructor() (gas: 164)
EIP712Test:test_DOMAIN_SEPARATOR() (gas: 5729)
EIP712Test:test_buildDomainSeparator() (gas: 6363)
EIP712Test:test_cachedDomainSeparatorInvalidated() (gas: 5454)
EIP712Test:test_domainNameAndVersion() (gas: 1261)
EIP712Test:test_eip712Domain() (gas: 187)
EIP712Test:test_hashTypedData() (gas: 187)
EIP712Test:test_eip712Domain() (gas: 10831)
EIP712Test:test_hashTypedData() (gas: 37085)
Execute:test_execute_CannotExecuteOrder_invalid_acceptablePrice() (gas: 322478)
Execute:test_execute_CannotExecuteOrder_invalid_settlementStrategyId() (gas: 103691)
Execute:test_execute_CannotExecuteOrder_too_leveraged() (gas: 469124)
Expand All @@ -65,9 +64,9 @@ FulfillOracleQuery:test_fulfillOracleQuery_refund(bytes) (runs: 256, μ: 40303,
FulfillOracleQuery:test_fulfillOracleQuery_revert(bytes) (runs: 256, μ: 32927, ~: 32919)
MathLibTest:test_abs128() (gas: 448)
MathLibTest:test_abs256() (gas: 458)
MathLibTest:test_fuzz_abs128(int128) (runs: 256, μ: 577, ~: 603)
MathLibTest:test_fuzz_abs256(int256) (runs: 256, μ: 449, ~: 436)
MathLibTest:test_fuzz_toInt256(uint256) (runs: 256, μ: 989, ~: 438)
MathLibTest:test_fuzz_abs128(int128) (runs: 256, μ: 578, ~: 603)
MathLibTest:test_fuzz_abs256(int256) (runs: 256, μ: 451, ~: 436)
MathLibTest:test_fuzz_toInt256(uint256) (runs: 256, μ: 1000, ~: 438)
MathLibTest:test_isSameSign() (gas: 999)
MathLibTest:test_toInt256() (gas: 3347)
MathLibTest:test_toInt256_overflow() (gas: 3251)
Expand All @@ -79,11 +78,11 @@ Multicall:testMulticallableBenchmark() (gas: 29229)
Multicall:testMulticallableOriginalBenchmark() (gas: 38452)
Multicall:testMulticallablePreservesMsgSender() (gas: 11116)
Multicall:testMulticallableReturnDataIsProperlyEncoded() (gas: 11637)
Multicall:testMulticallableReturnDataIsProperlyEncoded(string,string,uint256) (runs: 256, μ: 9797, ~: 9409)
Multicall:testMulticallableReturnDataIsProperlyEncoded(string,string,uint256) (runs: 256, μ: 9680, ~: 7435)
Multicall:testMulticallableReturnDataIsProperlyEncoded(uint256,uint256,uint256,uint256) (runs: 256, μ: 11695, ~: 11695)
Multicall:testMulticallableRevertWithCustomError() (gas: 11746)
Multicall:testMulticallableRevertWithMessage() (gas: 13451)
Multicall:testMulticallableRevertWithMessage(string) (runs: 256, μ: 14035, ~: 13883)
Multicall:testMulticallableRevertWithMessage(string) (runs: 256, μ: 14138, ~: 14177)
Multicall:testMulticallableRevertWithNothing() (gas: 11655)
Multicall:testMulticallableWithNoData() (gas: 6311)
MulticallFulfillOracleQuery:test_fulfillOracleQuery_multicall(bytes) (runs: 256, μ: 34608, ~: 34543)
Expand All @@ -102,7 +101,8 @@ ReduceOnly:test_reduce_only_truncate_size_up() (gas: 614783)
ReduceOnly:test_reduce_only_when_position_doesnt_exist() (gas: 166346)
ReduceOnly:test_reduce_only_zero_size_delta() (gas: 166380)
RemoveUpgradability:test_removeUpgradability() (gas: 4537931)
SignatureCheckerLibTest:test_isValidSignatureNowCalldata(address,bytes32,bytes) (runs: 256, μ: 3496, ~: 3474)
SignatureCheckerLibTest:testSignatureChecker(bytes32) (runs: 256, μ: 31623, ~: 28584)
SignatureCheckerLibTest:test_isValidSignatureNowCalldata(address,bytes32,bytes) (runs: 256, μ: 35465847065546046, ~: 3451)
StorageLayout:test_credit_slot() (gas: 5584)
StorageLayout:test_nonceBitmap_slot() (gas: 5520)
VerifyConditions:test_max_condition_size_exceeded() (gas: 51317)
Expand Down
Loading

0 comments on commit 6bf2ebb

Please sign in to comment.