Skip to content

Commit

Permalink
feat: support solc v0.8.27
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgar2017 committed Sep 10, 2024
1 parent cebb933 commit 5e13f35
Show file tree
Hide file tree
Showing 189 changed files with 782 additions and 599 deletions.
2 changes: 1 addition & 1 deletion solidity/ethereum/abiEncoderV1/abi_decode_v2_storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ contract C {
}
// ----
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
// gas irOptimized: 203173
// gas irOptimized: 203167
// gas legacy: 206263
// gas legacyOptimized: 203172
8 changes: 4 additions & 4 deletions solidity/ethereum/abiEncoderV1/abi_encode_calldata_slice.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ contract C {
// ----
// test_bytes() ->
// gas irOptimized: 314884
// gas legacy: 305827
// gas legacyOptimized: 253681
// gas legacy: 305816
// gas legacyOptimized: 253573
// test_uint256() ->
// gas irOptimized: 448346
// gas legacy: 421315
// gas legacyOptimized: 351650
// gas legacy: 421304
// gas legacyOptimized: 351544
6 changes: 3 additions & 3 deletions solidity/ethereum/abiEncoderV1/struct/struct_storage_ptr.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ contract C {
// ----
// library: L
// f() -> 8, 7, 1, 2, 7, 12
// gas irOptimized: 166759
// gas legacy: 169283
// gas legacyOptimized: 167248
// gas irOptimized: 166761
// gas legacy: 169273
// gas legacyOptimized: 167243
8 changes: 4 additions & 4 deletions solidity/ethereum/abiEncoderV2/abi_encode_calldata_slice.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ contract C {
// ----
// test_bytes() ->
// gas irOptimized: 314884
// gas legacy: 305827
// gas legacyOptimized: 253681
// gas legacy: 305816
// gas legacyOptimized: 253573
// test_uint256() ->
// gas irOptimized: 448346
// gas legacy: 421315
// gas legacyOptimized: 351650
// gas legacy: 421304
// gas legacyOptimized: 351544
2 changes: 1 addition & 1 deletion solidity/ethereum/abiEncoderV2/abi_encode_v2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ contract C {
// f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
// f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3
// gas irOptimized: 111816
// gas legacy: 113892
// gas legacy: 113890
// gas legacyOptimized: 111658
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ contract C is B {
// ----
// test() -> 5, 10
// gas irOptimized: 87337
// gas legacy: 66251
// gas legacy: 66250
// gas legacy code: 36400
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ contract C {
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE
// f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2
// gas irOptimized: 111415
// gas legacy: 112709
// gas legacyOptimized: 111847
// gas irOptimized: 111409
// gas legacy: 112707
// gas legacyOptimized: 111845
// f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6
// f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5 -> FAILURE
6 changes: 3 additions & 3 deletions solidity/ethereum/abiEncoderV2/storage_array_encoding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ contract C {
// EVMVersion: >homestead
// ----
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
// gas irOptimized: 180086
// gas legacy: 184235
// gas legacyOptimized: 180857
// gas irOptimized: 180080
// gas legacy: 184233
// gas legacyOptimized: 180856
// i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224
// gas irOptimized: 112031
// gas legacy: 115091
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ contract C {
}
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
// gas irOptimized: 135505
// gas legacy: 137096
// gas legacyOptimized: 135824
// gas irOptimized: 135499
// gas legacy: 137095
// gas legacyOptimized: 135823
4 changes: 2 additions & 2 deletions solidity/ethereum/array/array_memory_index_access.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ contract C {
// index(uint256): 20 -> true
// index(uint256): 0xFF -> true
// gas irOptimized: 108272
// gas legacy: 181523
// gas legacyOptimized: 117443
// gas legacy: 181536
// gas legacyOptimized: 117442
// accessIndex(uint256,int256): 10, 1 -> 2
// accessIndex(uint256,int256): 10, 0 -> 1
// accessIndex(uint256,int256): 10, 11 -> FAILURE, hex"4e487b71", 0x32
Expand Down
18 changes: 9 additions & 9 deletions solidity/ethereum/array/array_storage_index_access.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@ contract C {
// test_indices(uint256): 1 ->
// test_indices(uint256): 129 ->
// gas irOptimized: 3017687
// gas legacy: 3038654
// gas legacy: 3038668
// gas legacyOptimized: 2995964
// test_indices(uint256): 5 ->
// gas irOptimized: 579670
// gas legacy: 573810
// gas legacy: 573821
// gas legacyOptimized: 571847
// test_indices(uint256): 10 ->
// gas irOptimized: 157953
// gas legacy: 160108
// gas legacy: 160122
// gas legacyOptimized: 156996
// test_indices(uint256): 15 ->
// gas irOptimized: 172733
// gas legacy: 175973
// gas legacy: 175987
// gas legacyOptimized: 171596
// test_indices(uint256): 0xFF ->
// gas irOptimized: 5673823
// gas legacy: 5715748
// gas legacy: 5715762
// gas legacyOptimized: 5632556
// test_indices(uint256): 1000 ->
// gas irOptimized: 18173005
// gas legacy: 18347810
// gas legacy: 18347824
// gas legacyOptimized: 18037248
// test_indices(uint256): 129 ->
// gas irOptimized: 4166279
// gas legacy: 4140113
// gas legacy: 4140124
// gas legacyOptimized: 4108272
// test_indices(uint256): 128 ->
// gas irOptimized: 405522
// gas legacy: 433498
// gas legacy: 433512
// gas legacyOptimized: 400909
// test_indices(uint256): 1 ->
// gas irOptimized: 583437
// gas legacy: 576715
// gas legacy: 576726
// gas legacyOptimized: 575542
8 changes: 4 additions & 4 deletions solidity/ethereum/array/array_storage_index_boundary_test.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ contract C {
// test_boundary_check(uint256,uint256): 10, 10 -> FAILURE, hex"4e487b71", 0x32
// test_boundary_check(uint256,uint256): 256, 256 -> FAILURE, hex"4e487b71", 0x32
// gas irOptimized: 147246
// gas legacy: 133633
// gas legacyOptimized: 114354
// gas legacy: 133632
// gas legacyOptimized: 114353
// test_boundary_check(uint256,uint256): 256, 255 -> 0
// gas irOptimized: 149422
// gas legacy: 135949
// gas legacyOptimized: 116533
// gas legacy: 135948
// gas legacyOptimized: 116532
// test_boundary_check(uint256,uint256): 256, 0xFFFF -> FAILURE, hex"4e487b71", 0x32
// test_boundary_check(uint256,uint256): 256, 2 -> 0
28 changes: 14 additions & 14 deletions solidity/ethereum/array/array_storage_index_zeroed_test.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
contract C {
uint[] storageArray;
function test_zeroed_indicies(uint256 len) public
function test_zeroed_indices(uint256 len) public
{
while(storageArray.length < len)
storageArray.push();
Expand Down Expand Up @@ -50,20 +50,20 @@ contract C {
}
}
// ----
// test_zeroed_indicies(uint256): 1 ->
// test_zeroed_indicies(uint256): 5 ->
// test_zeroed_indices(uint256): 1 ->
// test_zeroed_indices(uint256): 5 ->
// gas irOptimized: 133763
// gas legacy: 131671
// gas legacyOptimized: 129994
// test_zeroed_indicies(uint256): 10 ->
// gas legacy: 131664
// gas legacyOptimized: 129990
// test_zeroed_indices(uint256): 10 ->
// gas irOptimized: 228556
// gas legacy: 225237
// gas legacyOptimized: 222359
// test_zeroed_indicies(uint256): 15 ->
// gas legacy: 225215
// gas legacyOptimized: 222351
// test_zeroed_indices(uint256): 15 ->
// gas irOptimized: 327360
// gas legacy: 322937
// gas legacyOptimized: 318919
// test_zeroed_indicies(uint256): 0xFF ->
// gas legacy: 322899
// gas legacyOptimized: 318907
// test_zeroed_indices(uint256): 0xFF ->
// gas irOptimized: 5180120
// gas legacy: 5093941
// gas legacyOptimized: 5020727
// gas legacy: 5093135
// gas legacyOptimized: 5020523
4 changes: 2 additions & 2 deletions solidity/ethereum/array/array_storage_push_empty.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ contract C {
// ----
// pushEmpty(uint256): 128
// gas irOptimized: 410745
// gas legacy: 400640
// gas legacy: 400519
// gas legacyOptimized: 388804
// pushEmpty(uint256): 256
// gas irOptimized: 698285
// gas legacy: 685108
// gas legacy: 684859
// gas legacyOptimized: 671480
// pushEmpty(uint256): 38869 -> FAILURE # out-of-gas #
// gas irOptimized: 100000000
Expand Down
4 changes: 2 additions & 2 deletions solidity/ethereum/array/array_storage_push_pop.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ contract C {
// gas legacyOptimized: 103508
// set_get_length(uint256): 0xFF -> 0
// gas irOptimized: 833586
// gas legacy: 808020
// gas legacy: 807764
// gas legacyOptimized: 784467
// set_get_length(uint256): 0xFFF -> 0
// gas irOptimized: 13029438
// gas legacy: 12612192
// gas legacy: 12608096
// gas legacyOptimized: 12239199
// set_get_length(uint256): 0xFFFF -> FAILURE # Out-of-gas #
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ contract Test {
}
// ----
// set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06
// gas irOptimized: 185219
// gas irOptimized: 185216
// gas legacy: 211054
// gas legacyOptimized: 206077
// data(uint256,uint256): 0x02, 0x02 -> 0x09
Expand Down
4 changes: 2 additions & 2 deletions solidity/ethereum/array/byte_array_storage_layout.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ contract c {
// storageEmpty -> 0
// test_long() -> 67
// gas irOptimized: 89148
// gas legacy: 101601
// gas legacyOptimized: 100477
// gas legacy: 101607
// gas legacyOptimized: 100479
// storageEmpty -> 0
// test_pop() -> 1780731860627700044960722568376592200742329637303199754547598369979433020
// gas legacy: 61930
Expand Down
4 changes: 2 additions & 2 deletions solidity/ethereum/array/byte_array_transitional_2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ contract c {
}
// ----
// test() -> 0
// gas irOptimized: 122719
// gas legacy: 147098
// gas irOptimized: 122717
// gas legacy: 147108
// gas legacyOptimized: 144200
4 changes: 2 additions & 2 deletions solidity/ethereum/array/bytes_length_member.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contract c {
// ----
// getLength() -> 0
// set(): 1, 2 -> true
// gas irOptimized: 110425
// gas legacy: 110952
// gas irOptimized: 110422
// gas legacy: 110951
// gas legacyOptimized: 110576
// getLength() -> 68
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ contract c {
// ----
// store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32
// gas irOptimized: 647725
// gas legacy: 694356
// gas legacyOptimized: 693850
// gas legacy: 694354
// gas legacyOptimized: 693849
// retrieve() -> 9, 28, 9, 28, 4, 3, 32
4 changes: 2 additions & 2 deletions solidity/ethereum/array/copying/array_copy_cleanup_uint40.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ contract C {
}
// ----
// f() -> true
// gas irOptimized: 122592
// gas legacy: 124660
// gas irOptimized: 122541
// gas legacy: 124643
// gas legacyOptimized: 122801
4 changes: 2 additions & 2 deletions solidity/ethereum/array/copying/array_copy_clear_storage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ contract C {
}
// ----
// f() -> 0
// gas irOptimized: 108246
// gas legacy: 108218
// gas irOptimized: 108229
// gas legacy: 108216
// gas legacyOptimized: 107625
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ contract c {
}
// ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000
// gas irOptimized: 208459
// gas legacy: 220707
// gas legacyOptimized: 220098
// gas irOptimized: 208415
// gas legacy: 220711
// gas legacyOptimized: 220097
10 changes: 5 additions & 5 deletions solidity/ethereum/array/copying/array_copy_including_array.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ contract c {
}
// ----
// test() -> 0x02000202
// gas irOptimized: 4549703
// gas legacy: 4475396
// gas irOptimized: 4549676
// gas legacy: 4475394
// gas legacyOptimized: 4447665
// storageEmpty -> 1
// clear() -> 0, 0
// gas irOptimized: 4478226
// gas legacy: 4407188
// gas legacyOptimized: 4381336
// gas irOptimized: 4478184
// gas legacy: 4407185
// gas legacyOptimized: 4381337
// storageEmpty -> 1
6 changes: 3 additions & 3 deletions solidity/ethereum/array/copying/array_copy_nested_array.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ contract c {
}
// ----
// test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10
// gas irOptimized: 689558
// gas legacy: 686178
// gas legacyOptimized: 685612
// gas irOptimized: 689552
// gas legacy: 686176
// gas legacyOptimized: 685611
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ contract c {
// test() -> 5, 4
// gas irOptimized: 205667
// gas legacy: 213863
// gas legacyOptimized: 212902
// gas legacyOptimized: 212901
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ contract c {
// ----
// test() -> 3, 4
// gas irOptimized: 169669
// gas legacy: 175424
// gas legacyOptimized: 172535
// gas legacy: 175415
// gas legacyOptimized: 172533
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract c {
// ----
// setData1(uint256,uint256,uint256): 10, 5, 4 ->
// copyStorageStorage() ->
// gas irOptimized: 111353
// gas irOptimized: 111350
// gas legacy: 109272
// gas legacyOptimized: 109262
// getData2(uint256): 5 -> 10, 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ contract c {
// test() -> 5, 4
// gas irOptimized: 253591
// gas legacy: 250892
// gas legacyOptimized: 250046
// gas legacyOptimized: 250045
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ contract c {
// ----
// test() -> 9, 4
// gas irOptimized: 123180
// gas legacy: 123567
// gas legacy: 123566
// gas legacyOptimized: 123202
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ contract c {
// ----
// test() -> 8, 0
// gas irOptimized: 196251
// gas legacy: 194843
// gas legacy: 194842
// gas legacyOptimized: 194281
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ contract c {
// ----
// test() -> 4, 5
// gas irOptimized: 190628
// gas legacy: 190852
// gas legacyOptimized: 189658
// gas legacy: 190828
// gas legacyOptimized: 189657
// storageEmpty -> 1
Loading

0 comments on commit 5e13f35

Please sign in to comment.