Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Every possible safeCast #355

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 118 additions & 39 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -347,48 +347,127 @@ SSTORE2Test:testWriteReadCustomStartBound(bytes,uint256,bytes) (runs: 256, μ: 4
SSTORE2Test:testWriteReadEmptyBound() (gas: 34677)
SSTORE2Test:testWriteReadFullBoundedRead() (gas: 53672)
SSTORE2Test:testWriteReadFullStartBound() (gas: 34764)
SafeCastLibTest:testFailSafeCastTo128() (gas: 321)
SafeCastLibTest:testFailSafeCastTo128(uint256) (runs: 256, μ: 443, ~: 443)
SafeCastLibTest:testFailSafeCastTo16() (gas: 343)
SafeCastLibTest:testFailSafeCastTo16(uint256) (runs: 256, μ: 401, ~: 401)
SafeCastLibTest:testFailSafeCastTo160() (gas: 342)
SafeCastLibTest:testFailSafeCastTo160(uint256) (runs: 256, μ: 422, ~: 422)
SafeCastLibTest:testFailSafeCastTo192() (gas: 322)
SafeCastLibTest:testFailSafeCastTo192(uint256) (runs: 256, μ: 401, ~: 401)
SafeCastLibTest:testFailSafeCastTo224() (gas: 365)
SafeCastLibTest:testFailSafeCastTo224(uint256) (runs: 256, μ: 445, ~: 445)
SafeCastLibTest:testFailSafeCastTo24(uint256) (runs: 256, μ: 402, ~: 402)
SafeCastLibTest:testFailSafeCastTo248() (gas: 321)
SafeCastLibTest:testFailSafeCastTo248(uint256) (runs: 256, μ: 444, ~: 444)
SafeCastLibTest:testFailSafeCastTo104() (gas: 387)
SafeCastLibTest:testFailSafeCastTo104(uint256) (runs: 256, μ: 468, ~: 468)
SafeCastLibTest:testFailSafeCastTo112() (gas: 388)
SafeCastLibTest:testFailSafeCastTo112(uint256) (runs: 256, μ: 445, ~: 445)
SafeCastLibTest:testFailSafeCastTo120() (gas: 409)
SafeCastLibTest:testFailSafeCastTo120(uint256) (runs: 256, μ: 490, ~: 490)
SafeCastLibTest:testFailSafeCastTo128() (gas: 365)
SafeCastLibTest:testFailSafeCastTo128(uint256) (runs: 256, μ: 487, ~: 487)
SafeCastLibTest:testFailSafeCastTo136() (gas: 409)
SafeCastLibTest:testFailSafeCastTo136(uint256) (runs: 256, μ: 489, ~: 489)
SafeCastLibTest:testFailSafeCastTo144() (gas: 365)
SafeCastLibTest:testFailSafeCastTo144(uint256) (runs: 256, μ: 423, ~: 423)
SafeCastLibTest:testFailSafeCastTo152() (gas: 368)
SafeCastLibTest:testFailSafeCastTo152(uint256) (runs: 256, μ: 468, ~: 468)
SafeCastLibTest:testFailSafeCastTo16() (gas: 388)
SafeCastLibTest:testFailSafeCastTo16(uint256) (runs: 256, μ: 468, ~: 468)
SafeCastLibTest:testFailSafeCastTo160() (gas: 409)
SafeCastLibTest:testFailSafeCastTo160(uint256) (runs: 256, μ: 444, ~: 444)
SafeCastLibTest:testFailSafeCastTo168() (gas: 341)
SafeCastLibTest:testFailSafeCastTo168(uint256) (runs: 256, μ: 488, ~: 488)
SafeCastLibTest:testFailSafeCastTo176() (gas: 363)
SafeCastLibTest:testFailSafeCastTo176(uint256) (runs: 256, μ: 489, ~: 489)
SafeCastLibTest:testFailSafeCastTo184() (gas: 343)
SafeCastLibTest:testFailSafeCastTo184(uint256) (runs: 256, μ: 490, ~: 490)
SafeCastLibTest:testFailSafeCastTo192() (gas: 367)
SafeCastLibTest:testFailSafeCastTo192(uint256) (runs: 256, μ: 446, ~: 446)
SafeCastLibTest:testFailSafeCastTo200() (gas: 343)
SafeCastLibTest:testFailSafeCastTo200(uint256) (runs: 256, μ: 490, ~: 490)
SafeCastLibTest:testFailSafeCastTo208() (gas: 386)
SafeCastLibTest:testFailSafeCastTo208(uint256) (runs: 256, μ: 446, ~: 446)
SafeCastLibTest:testFailSafeCastTo216() (gas: 365)
SafeCastLibTest:testFailSafeCastTo216(uint256) (runs: 256, μ: 424, ~: 424)
SafeCastLibTest:testFailSafeCastTo224() (gas: 409)
SafeCastLibTest:testFailSafeCastTo224(uint256) (runs: 256, μ: 423, ~: 423)
SafeCastLibTest:testFailSafeCastTo232() (gas: 410)
SafeCastLibTest:testFailSafeCastTo232(uint256) (runs: 256, μ: 467, ~: 467)
SafeCastLibTest:testFailSafeCastTo24() (gas: 387)
SafeCastLibTest:testFailSafeCastTo24(uint256) (runs: 256, μ: 424, ~: 424)
SafeCastLibTest:testFailSafeCastTo240() (gas: 364)
SafeCastLibTest:testFailSafeCastTo240(uint256) (runs: 256, μ: 467, ~: 467)
SafeCastLibTest:testFailSafeCastTo248() (gas: 365)
SafeCastLibTest:testFailSafeCastTo248(uint256) (runs: 256, μ: 466, ~: 466)
SafeCastLibTest:testFailSafeCastTo32() (gas: 364)
SafeCastLibTest:testFailSafeCastTo32(uint256) (runs: 256, μ: 446, ~: 446)
SafeCastLibTest:testFailSafeCastTo64() (gas: 343)
SafeCastLibTest:testFailSafeCastTo64(uint256) (runs: 256, μ: 423, ~: 423)
SafeCastLibTest:testFailSafeCastTo32(uint256) (runs: 256, μ: 468, ~: 468)
SafeCastLibTest:testFailSafeCastTo40() (gas: 366)
SafeCastLibTest:testFailSafeCastTo40(uint256) (runs: 256, μ: 422, ~: 422)
SafeCastLibTest:testFailSafeCastTo48() (gas: 366)
SafeCastLibTest:testFailSafeCastTo48(uint256) (runs: 256, μ: 488, ~: 488)
SafeCastLibTest:testFailSafeCastTo56() (gas: 388)
SafeCastLibTest:testFailSafeCastTo56(uint256) (runs: 256, μ: 445, ~: 445)
SafeCastLibTest:testFailSafeCastTo64() (gas: 410)
SafeCastLibTest:testFailSafeCastTo64(uint256) (runs: 256, μ: 446, ~: 446)
SafeCastLibTest:testFailSafeCastTo72() (gas: 410)
SafeCastLibTest:testFailSafeCastTo72(uint256) (runs: 256, μ: 467, ~: 467)
SafeCastLibTest:testFailSafeCastTo8() (gas: 341)
SafeCastLibTest:testFailSafeCastTo8(uint256) (runs: 256, μ: 421, ~: 421)
SafeCastLibTest:testFailSafeCastTo96() (gas: 343)
SafeCastLibTest:testFailSafeCastTo96(uint256) (runs: 256, μ: 424, ~: 424)
SafeCastLibTest:testSafeCastTo128() (gas: 472)
SafeCastLibTest:testSafeCastTo128(uint256) (runs: 256, μ: 2756, ~: 2756)
SafeCastLibTest:testSafeCastTo16() (gas: 447)
SafeCastLibTest:testSafeCastTo16(uint256) (runs: 256, μ: 2734, ~: 2734)
SafeCastLibTest:testSafeCastTo160() (gas: 470)
SafeCastLibTest:testSafeCastTo160(uint256) (runs: 256, μ: 2731, ~: 2731)
SafeCastLibTest:testSafeCastTo192() (gas: 449)
SafeCastLibTest:testSafeCastTo192(uint256) (runs: 256, μ: 2711, ~: 2711)
SafeCastLibTest:testSafeCastTo224() (gas: 491)
SafeCastLibTest:testSafeCastTo224(uint256) (runs: 256, μ: 2710, ~: 2710)
SafeCastLibTest:testSafeCastTo24() (gas: 492)
SafeCastLibTest:testSafeCastTo248() (gas: 450)
SafeCastLibTest:testSafeCastTo248(uint256) (runs: 256, μ: 2755, ~: 2755)
SafeCastLibTest:testSafeCastTo32() (gas: 449)
SafeCastLibTest:testSafeCastTo32(uint256) (runs: 256, μ: 2733, ~: 2733)
SafeCastLibTest:testSafeCastTo64() (gas: 492)
SafeCastLibTest:testSafeCastTo64(uint256) (runs: 256, μ: 2732, ~: 2732)
SafeCastLibTest:testSafeCastTo8() (gas: 491)
SafeCastLibTest:testSafeCastTo8(uint256) (runs: 256, μ: 2710, ~: 2710)
SafeCastLibTest:testSafeCastTo96() (gas: 469)
SafeCastLibTest:testSafeCastTo96(uint256) (runs: 256, μ: 2711, ~: 2711)
SafeCastLibTest:testFailSafeCastTo80() (gas: 343)
SafeCastLibTest:testFailSafeCastTo80(uint256) (runs: 256, μ: 424, ~: 424)
SafeCastLibTest:testFailSafeCastTo88() (gas: 344)
SafeCastLibTest:testFailSafeCastTo88(uint256) (runs: 256, μ: 489, ~: 489)
SafeCastLibTest:testFailSafeCastTo96() (gas: 366)
SafeCastLibTest:testFailSafeCastTo96(uint256) (runs: 256, μ: 469, ~: 469)
SafeCastLibTest:testSafeCastTo104() (gas: 515)
SafeCastLibTest:testSafeCastTo104(uint256) (runs: 256, μ: 2779, ~: 2779)
SafeCastLibTest:testSafeCastTo112() (gas: 469)
SafeCastLibTest:testSafeCastTo112(uint256) (runs: 256, μ: 2755, ~: 2755)
SafeCastLibTest:testSafeCastTo120() (gas: 491)
SafeCastLibTest:testSafeCastTo120(uint256) (runs: 256, μ: 2735, ~: 2735)
SafeCastLibTest:testSafeCastTo128() (gas: 516)
SafeCastLibTest:testSafeCastTo128(uint256) (runs: 256, μ: 2735, ~: 2735)
SafeCastLibTest:testSafeCastTo136() (gas: 470)
SafeCastLibTest:testSafeCastTo136(uint256) (runs: 256, μ: 2757, ~: 2757)
SafeCastLibTest:testSafeCastTo144() (gas: 514)
SafeCastLibTest:testSafeCastTo144(uint256) (runs: 256, μ: 2798, ~: 2798)
SafeCastLibTest:testSafeCastTo152() (gas: 494)
SafeCastLibTest:testSafeCastTo152(uint256) (runs: 256, μ: 2734, ~: 2734)
SafeCastLibTest:testSafeCastTo16() (gas: 469)
SafeCastLibTest:testSafeCastTo16(uint256) (runs: 256, μ: 2779, ~: 2779)
SafeCastLibTest:testSafeCastTo160() (gas: 491)
SafeCastLibTest:testSafeCastTo160(uint256) (runs: 256, μ: 2775, ~: 2775)
SafeCastLibTest:testSafeCastTo168() (gas: 494)
SafeCastLibTest:testSafeCastTo168(uint256) (runs: 256, μ: 2799, ~: 2799)
SafeCastLibTest:testSafeCastTo176() (gas: 493)
SafeCastLibTest:testSafeCastTo176(uint256) (runs: 256, μ: 2734, ~: 2734)
SafeCastLibTest:testSafeCastTo184() (gas: 513)
SafeCastLibTest:testSafeCastTo184(uint256) (runs: 256, μ: 2801, ~: 2801)
SafeCastLibTest:testSafeCastTo192() (gas: 494)
SafeCastLibTest:testSafeCastTo192(uint256) (runs: 256, μ: 2734, ~: 2734)
SafeCastLibTest:testSafeCastTo200() (gas: 470)
SafeCastLibTest:testSafeCastTo200(uint256) (runs: 256, μ: 2734, ~: 2734)
SafeCastLibTest:testSafeCastTo208() (gas: 472)
SafeCastLibTest:testSafeCastTo208(uint256) (runs: 256, μ: 2756, ~: 2756)
SafeCastLibTest:testSafeCastTo216() (gas: 493)
SafeCastLibTest:testSafeCastTo216(uint256) (runs: 256, μ: 2777, ~: 2777)
SafeCastLibTest:testSafeCastTo224() (gas: 469)
SafeCastLibTest:testSafeCastTo224(uint256) (runs: 256, μ: 2733, ~: 2733)
SafeCastLibTest:testSafeCastTo232() (gas: 492)
SafeCastLibTest:testSafeCastTo232(uint256) (runs: 256, μ: 2735, ~: 2735)
SafeCastLibTest:testSafeCastTo24() (gas: 515)
SafeCastLibTest:testSafeCastTo24(uint256) (runs: 256, μ: 2733, ~: 2733)
SafeCastLibTest:testSafeCastTo240() (gas: 513)
SafeCastLibTest:testSafeCastTo240(uint256) (runs: 256, μ: 2800, ~: 2800)
SafeCastLibTest:testSafeCastTo248() (gas: 472)
SafeCastLibTest:testSafeCastTo248(uint256) (runs: 256, μ: 2777, ~: 2777)
SafeCastLibTest:testSafeCastTo32() (gas: 516)
SafeCastLibTest:testSafeCastTo32(uint256) (runs: 256, μ: 2777, ~: 2777)
SafeCastLibTest:testSafeCastTo40() (gas: 517)
SafeCastLibTest:testSafeCastTo40(uint256) (runs: 256, μ: 2756, ~: 2756)
SafeCastLibTest:testSafeCastTo48() (gas: 469)
SafeCastLibTest:testSafeCastTo48(uint256) (runs: 256, μ: 2778, ~: 2778)
SafeCastLibTest:testSafeCastTo56() (gas: 470)
SafeCastLibTest:testSafeCastTo56(uint256) (runs: 256, μ: 2801, ~: 2801)
SafeCastLibTest:testSafeCastTo64() (gas: 537)
SafeCastLibTest:testSafeCastTo64(uint256) (runs: 256, μ: 2799, ~: 2799)
SafeCastLibTest:testSafeCastTo72(uint256) (runs: 256, μ: 2798, ~: 2798)
SafeCastLibTest:testSafeCastTo8() (gas: 513)
SafeCastLibTest:testSafeCastTo8(uint256) (runs: 256, μ: 2755, ~: 2755)
SafeCastLibTest:testSafeCastTo80(uint256) (runs: 256, μ: 2736, ~: 2736)
SafeCastLibTest:testSafeCastTo88(uint256) (runs: 256, μ: 2755, ~: 2755)
SafeCastLibTest:testSafeCastTo96() (gas: 536)
SafeCastLibTest:testSafeCastTo96(uint256) (runs: 256, μ: 2800, ~: 2800)
SafeTransferLibTest:testApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 2664, ~: 2231)
SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30751)
SafeTransferLibTest:testApproveWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 30328, ~: 31566)
Expand Down
Loading