Skip to content

Commit b9967c6

Browse files
authored
Merge pull request #13289 from ethereum/calldata_tests
Calldata validation tests
2 parents 3c0a735 + 99ac7e0 commit b9967c6

7 files changed

+292
-15
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
pragma abicoder v2;
2+
3+
contract C {
4+
function f(uint[][] calldata a) public returns (uint[][] memory) {
5+
return a;
6+
}
7+
8+
function g(uint[][][] calldata a) public returns (uint[][][] memory) {
9+
return a;
10+
}
11+
12+
function h(uint[2][][] calldata a) public returns (uint[2][][] memory) {
13+
return a;
14+
}
15+
}
16+
17+
// ----
18+
// f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8 -> 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8
19+
// f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8, 9 -> 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8
20+
// f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8 -> FAILURE
21+
// g(uint256[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8 -> 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8
22+
// g(uint256[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0xa0, 2, 5, 6, 2, 7 -> FAILURE
23+
// h(uint256[2][][]): 0x20, 2, 0x40, 0x60, 0, 2, 5, 6, 7, 8 -> 0x20, 2, 0x40, 0x60, 0, 2, 5, 6, 7, 8
24+
// h(uint256[2][][]): 0x20, 2, 0x40, 0x60, 0, 2, 5, 6, 7, 8, 9 -> 0x20, 2, 0x40, 0x60, 0, 2, 5, 6, 7, 8
25+
// h(uint256[2][][]): 0x20, 2, 0x40, 0x60, 0, 2, 5, 6, 7 -> FAILURE
Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
11
pragma abicoder v2;
22

33
contract C {
4-
function h(uint[][] calldata a) public {
5-
abi.encode(a);
6-
}
7-
struct S { uint[] x; }
8-
function f(S calldata a) public {
9-
abi.encode(a);
10-
}
4+
function f(uint[][] calldata a) public returns (bytes memory) {
5+
return abi.encode(a);
6+
}
7+
function g(uint8[][][] calldata a) public returns (bytes memory) {
8+
return abi.encode(a);
9+
}
10+
function h(uint16[][2][] calldata a) public returns (bytes memory) {
11+
return abi.encode(a);
12+
}
13+
function i(uint16[][][1] calldata a) public returns (bytes memory) {
14+
return abi.encode(a);
15+
}
16+
function j(uint16[2][][] calldata a) public returns (bytes memory) {
17+
return abi.encode(a);
18+
}
1119
}
1220
// ====
1321
// revertStrings: debug
1422
// ----
15-
// h(uint256[][]): 0x20, 1, 0x20, 0 ->
16-
// h(uint256[][]): 0x20, 1, 0x20, 1 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
17-
// h(uint256[][]): 0x20, 1, 0x20, 2 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
18-
// h(uint256[][]): 0x20, 1, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
19-
// f((uint256[])): 0x20, 0x20, 0 ->
20-
// f((uint256[])): 0x20, 0x20, 1 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
21-
// f((uint256[])): 0x20, 0x20, 2 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
22-
// f((uint256[])): 0x20, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
23+
// f(uint256[][]): 0x20, 1, 0x20, 0 -> 0x20, 0x80, 0x20, 1, 0x20, 0
24+
// f(uint256[][]): 0x20, 1, 0x20, 1 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
25+
// f(uint256[][]): 0x20, 1, 0x20, 2 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
26+
// f(uint256[][]): 0x20, 1, 0x20, 3 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
27+
// g(uint8[][][]): 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12, 0 -> 0x20, 0x01a0, 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12, 0
28+
// g(uint8[][][]): 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access offset"
29+
// g(uint8[][][]): 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12, 1, 0x20, 0 -> 0x20, 0x01e0, 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12, 1, 0x20, 0
30+
// g(uint8[][][]): 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12, 1, 0x20, 0, 1 -> 0x20, 0x01e0, 0x20, 2, 0x40, 0x0140, 2, 0x40, 0x80, 1, 10, 2, 11, 12, 1, 0x20, 0
31+
// h(uint16[][2][]): 0x20, 2, 0x40, 0x0120, 0x40, 0x80, 1, 10, 2, 11, 12, 0x40, 0x60, 0, 1, 13 -> 0x20, 0x0200, 0x20, 2, 0x40, 288, 0x40, 0x80, 1, 10, 2, 11, 12, 0x40, 0x60, 0, 1, 13
32+
// h(uint16[][2][]): 0x20, 2, 0x40, 0x0120, 0x40, 0x80, 1, 10, 2, 11, 12, 0x40, 0x60, 0, 1 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
33+
// i(uint16[][][1]): 0x20, 0x20, 2, 0x40, 0x80, 1, 10, 2, 11, 12 -> 0x20, 0x0140, 0x20, 0x20, 2, 0x40, 0x80, 1, 10, 2, 11, 12
34+
// i(uint16[][][1]): 0x20, 0x20, 2, 0x40, 0x80, 1, 10, 2, 11 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
35+
// j(uint16[2][][]): 0x20, 2, 0x40, 0xa0, 1, 0x0a, 11, 2, 12, 13, 14, 15 -> 0x20, 0x0180, 0x20, 2, 0x40, 0xa0, 1, 10, 11, 2, 12, 13, 14, 15
36+
// j(uint16[2][][]): 0x20, 2, 0x40, 0xa0, 1, 0x0a, 11, 2, 12, 13, 14 -> FAILURE, hex"08c379a0", 0x20, 0x1e, "Invalid calldata access stride"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
pragma abicoder v2;
2+
3+
contract C {
4+
uint[] s;
5+
uint[2] n;
6+
7+
function f_memory(uint[] calldata a, uint[2] calldata b) public returns (uint[] memory, uint[2] memory) {
8+
return (a, b);
9+
}
10+
11+
function f_encode(uint[] calldata a, uint[2] calldata b) public returns (bytes memory) {
12+
return abi.encode(a, b);
13+
}
14+
15+
function f_which(uint[] calldata a, uint[2] calldata b, uint which) public returns (bytes memory) {
16+
return abi.encode(a[which], b[1]);
17+
}
18+
19+
function f_storage(uint[] calldata a, uint[2] calldata b ) public returns (bytes memory) {
20+
s = a;
21+
n = b;
22+
return abi.encode(s);
23+
}
24+
}
25+
26+
// ----
27+
// f_memory(uint256[],uint256[2]): 0x20, 1, 2 -> 0x60, 0x01, 0x02, 1, 2
28+
// f_memory(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x60, 1, 2, 2, 5, 6
29+
// f_memory(uint256[],uint256[2]): 0x40, 1, 2, 5 -> FAILURE
30+
// f_encode(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0xa0, 0x60, 1, 2, 1, 2
31+
// f_encode(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0xc0, 0x60, 1, 2, 2, 5, 6
32+
// f_encode(uint256[],uint256[2]): 0x40, 1, 2, 5 -> FAILURE
33+
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5 -> 0x20, 0x40, 5, 2
34+
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1, 5, 6 -> 0x20, 0x40, 5, 2
35+
// f_which(uint256[],uint256[2],uint256): 0x40, 1, 2, 1 -> FAILURE
36+
// f_storage(uint256[],uint256[2]): 0x20, 1, 2 -> 0x20, 0x60, 0x20, 1, 2
37+
// gas irOptimized: 111653
38+
// gas legacy: 112979
39+
// gas legacyOptimized: 112104
40+
// f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x20, 0x80, 0x20, 2, 5, 6
41+
// f_storage(uint256[],uint256[2]): 0x40, 1, 2, 5 -> FAILURE
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
pragma abicoder v2;
2+
3+
contract C {
4+
uint[] s;
5+
uint[2] n;
6+
7+
function f_memory(uint[][] calldata a) public returns (uint[][] memory) {
8+
return a;
9+
}
10+
11+
function f_encode(uint[][] calldata a) public returns (bytes memory) {
12+
return abi.encode(a);
13+
}
14+
15+
function f_which(uint[][] calldata a, uint which) public returns (uint[] memory) {
16+
return a[which];
17+
}
18+
}
19+
20+
// ----
21+
// f_memory(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 1, 2 -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 2, 1, 2
22+
// f_memory(uint256[][]): 0x20, 2, 0x40, 0x60, 2, 1, 2 -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 1, 2
23+
// f_memory(uint256[][]): 0x20, 2, 0, 0x60, 2, 1, 2 -> 0x20, 2, 0x40, 0x60, 0, 1, 2
24+
// f_memory(uint256[][]): 0x20, 2, 0, 0x60, 2, 2, 2 -> FAILURE
25+
// f_encode(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 1, 2 -> 0x20, 0x0140, 0x20, 2, 0x40, 0xa0, 2, 1, 2, 2, 1, 2
26+
// f_encode(uint256[][]): 0x20, 2, 0x40, 0x60, 2, 1, 2 -> 0x20, 0x0120, 0x20, 2, 0x40, 0xa0, 2, 1, 2, 1, 2
27+
// f_encode(uint256[][]): 0x20, 2, 0, 0x60, 2, 1, 2 -> 0x20, 0xe0, 0x20, 2, 0x40, 0x60, 0, 1, 2
28+
// f_encode(uint256[][]): 0x20, 2, 0, 0x60, 2, 2, 2 -> FAILURE
29+
// f_which(uint256[][],uint256): 0x40, 0, 2, 0x40, 0x40, 2, 1, 2 -> 0x20, 2, 1, 2
30+
// f_which(uint256[][],uint256): 0x40, 1, 2, 0x40, 0x40, 2, 1, 2 -> 0x20, 2, 1, 2
31+
// f_which(uint256[][],uint256): 0x40, 0, 2, 0x40, 0x60, 2, 1, 2 -> 0x20, 2, 1, 2
32+
// f_which(uint256[][],uint256): 0x40, 1, 2, 0x40, 0x60, 2, 1, 2 -> 0x20, 1, 2
33+
// f_which(uint256[][],uint256): 0x40, 0, 2, 0, 0x60, 2, 1, 2 -> 0x20, 0
34+
// f_which(uint256[][],uint256): 0x40, 1, 2, 0, 0x60, 2, 1, 2 -> 0x20, 1, 2
35+
// f_which(uint256[][],uint256): 0x40, 1, 2, 0, 0x60, 2, 2, 2 -> FAILURE
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
pragma abicoder v2;
2+
3+
contract C {
4+
struct D { uint[] x; }
5+
struct S { uint x; }
6+
7+
function f(D calldata a) public returns (bytes memory){
8+
return abi.encode(a);
9+
}
10+
11+
function g(D[2] calldata a) public returns (bytes memory) {
12+
return abi.encode(a);
13+
}
14+
15+
function h(D[][] calldata a) public returns (bytes memory) {
16+
return abi.encode(a);
17+
}
18+
19+
function i(D[2][] calldata a) public returns (bytes memory) {
20+
return abi.encode(a);
21+
}
22+
23+
function j(S[] memory a) public returns (bytes memory) {
24+
return abi.encode(a);
25+
}
26+
27+
function k(S[2] memory a) public returns (bytes memory) {
28+
return abi.encode(a);
29+
}
30+
31+
function l(S[][] memory a) public returns (bytes memory) {
32+
return abi.encode(a);
33+
}
34+
35+
}
36+
37+
// ----
38+
// f((uint256[])): 0x20, 0x20, 0 -> 0x20, 0x60, 0x20, 0x20, 0
39+
// f((uint256[])): 0x20, 0x20, 1 -> FAILURE
40+
// f((uint256[])): 0x20, 0x20, 2 -> FAILURE
41+
// f((uint256[])): 0x20, 0x20, 3 -> FAILURE
42+
// g((uint256[])[2]): 0x20, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3 -> 0x20, 0x0140, 0x20, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3
43+
// g((uint256[])[2]): 0x20, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1 -> FAILURE
44+
// h((uint256[])[][]): 0x20, 0x02, 0x40, 0x0180, 2, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3, 1, 0x20, 0x20, 1, 1 -> 0x20, 0x0260, 0x20, 2, 0x40, 0x0180, 2, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3, 1, 0x20, 0x20, 1, 1
45+
// h((uint256[])[][]): 0x20, 0x02, 0x40, 0x0180, 2, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3, 1, 0x20, 0x20, 1 -> FAILURE
46+
// i((uint256[])[2][]): 0x20, 1, 0x20, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3 -> 0x20, 0x0180, 0x20, 1, 0x20, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1, 3
47+
// i((uint256[])[2][]): 0x20, 1, 0x20, 0x40, 0xc0, 0x20, 2, 1, 2, 0x20, 1 -> FAILURE
48+
// j((uint256)[]): 0x20, 2, 1, 2 -> 0x20, 0x80, 0x20, 2, 1, 2
49+
// j((uint256)[]): 0x20, 2, 1 -> FAILURE
50+
// k((uint256)[2]): 1, 2 -> 0x20, 0x40, 1, 2
51+
// k((uint256)[2]): 1 -> FAILURE
52+
// l((uint256)[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8, 9 -> 0x20, 0x0160, 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8, 9
53+
// l((uint256)[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8, 9, 10 -> 0x20, 0x0160, 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8, 9
54+
// l((uint256)[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8 -> FAILURE
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
pragma abicoder v2;
2+
3+
contract C {
4+
struct S { uint[] a; }
5+
6+
function f(uint[][] calldata s, uint i, uint j) public pure returns (bytes memory) {
7+
return abi.encode(s[i][j]);
8+
}
9+
10+
function g(uint[][][] calldata s, uint i, uint j, uint k) public pure returns (bytes memory) {
11+
return abi.encode(s[i][j][k]);
12+
}
13+
14+
function h(uint[][][1] calldata s, uint i) public pure returns (bytes memory) {
15+
return abi.encode(s[0][i]);
16+
}
17+
18+
function k(S[][] calldata s, uint i, uint j) public pure returns (bytes memory) {
19+
return abi.encode(s[i][j].a);
20+
}
21+
22+
function l(S[2][2] calldata s, uint i, uint j) public pure returns (bytes memory) {
23+
return abi.encode(s[i][j].a);
24+
}
25+
}
26+
27+
// ====
28+
// revertStrings: debug
29+
// ----
30+
// f(uint256[][],uint256,uint256): 0x60, 0, 0, 2, 0x40, 0x80, 1, 7, 1, 8 -> 0x20, 0x20, 7
31+
// f(uint256[][],uint256,uint256): 0x60, 1, 0, 2, 0x40, 0x80, 1, 7, 1, 8 -> 0x20, 0x20, 8
32+
// g(uint256[][][],uint256,uint256,uint256): 0x80, 0, 0, 0, 2, 0x40, 0xc0, 1, 0x20, 1, 4, 2, 0x40, 0xa0, 2, 5, 6, 1, 7 -> 0x20, 0x20, 4
33+
// g(uint256[][][],uint256,uint256,uint256): 0x80, 1, 0, 1, 2, 0x40, 0xc0, 1, 0x20, 1, 4, 2, 0x40, 0xa0, 2, 5, 6, 1, 7 -> 0x20, 0x20, 6
34+
// g(uint256[][][],uint256,uint256,uint256): 0x80, 1, 0, 2, 2, 0x40, 0xc0, 1, 0x20, 1, 4, 2, 0x40, 0xa0, 2, 5, 6, 1, 7 -> FAILURE, hex"4e487b71", 0x32
35+
// g(uint256[][][],uint256,uint256,uint256): 0x80, 2, 0, 1, 2, 0x40, 0xc0, 1, 0x20, 1, 4, 2, 0x40, 0xa0, 2, 5, 6, 1, 7 -> FAILURE, hex"4e487b71", 0x32
36+
// h(uint256[][][1],uint256): 0x40, 1, 0x20, 2, 0x40, 0xA0, 2, 5, 6, 3, 7, 8, 9 -> 0x20, 0xa0, 0x20, 3, 7, 8, 9
37+
// h(uint256[][][1],uint256): 0x40, 2, 0x20, 2, 0x40, 0xA0, 2, 5, 6, 3, 7, 8, 9 -> FAILURE, hex"4e487b71", 0x32
38+
// k((uint256[])[][],uint256,uint256): 0x60, 0, 0, 2, 0x40, 0xe0, 1, 0x20, 0x20, 1, 6, 2, 0x40, 0xa0, 0x20, 1, 7, 0x20, 2, 8, 9 -> 0x20, 0x60, 0x20, 1, 6
39+
// k((uint256[])[][],uint256,uint256): 0x60, 0, 1, 2, 0x40, 0xe0, 1, 0x20, 0x20, 1, 6, 2, 0x40, 0xa0, 0x20, 1, 7, 0x20, 2, 8, 9 -> FAILURE, hex"4e487b71", 0x32
40+
// l((uint256[])[2][2],uint256,uint256): 0x60, 1, 1, 0x40, 0x0140, 0x40, 0xa0, 0x20, 1, 5, 0x20, 1, 6, 0x40, 0xa0, 0x20, 1, 7, 0x20, 2, 8, 9 -> 0x20, 0x80, 0x20, 2, 8, 9
41+
// l((uint256[])[2][2],uint256,uint256): 0x60, 1, 2, 0x40, 0x0140, 0x40, 0xa0, 0x20, 1, 5, 0x20, 1, 6, 0x40, 0xa0, 0x20, 1, 7, 0x20, 2, 8, 9 -> FAILURE, hex"4e487b71", 0x32
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
pragma abicoder v2;
2+
3+
contract C {
4+
uint[] aTmp;
5+
uint[2] bTmp;
6+
7+
function f_memory(uint[] calldata a) public returns (uint[] memory) {
8+
return a;
9+
}
10+
11+
function f_encode(uint[] calldata a) public returns (bytes memory) {
12+
return abi.encode(a);
13+
}
14+
15+
function f_storage(uint[] calldata a) public returns (bytes memory) {
16+
aTmp = a;
17+
return abi.encode(aTmp);
18+
}
19+
20+
function f_index(uint[] calldata a, uint which) public returns (uint) {
21+
return a[which];
22+
}
23+
24+
function g_memory(uint[] calldata a, uint[2] calldata b) public returns (uint[] memory, uint[2] memory) {
25+
return (a, b);
26+
}
27+
28+
function g_encode(uint[] calldata a, uint[2] calldata b) public returns (bytes memory) {
29+
return abi.encode(a, b);
30+
}
31+
32+
function g_storage(uint[] calldata a, uint[2] calldata b) public returns (bytes memory) {
33+
aTmp = a;
34+
bTmp = b;
35+
return abi.encode(aTmp, bTmp);
36+
}
37+
38+
function g_index(uint[] calldata a, uint[2] calldata b, uint which) public returns (uint, uint) {
39+
return (a[which], b[0]);
40+
}
41+
}
42+
43+
// ----
44+
// f_memory(uint256[]): 0x80, 9, 9, 9, 0 -> 0x20, 0
45+
// f_memory(uint256[]): 0x80, 9, 9, 9, 1, 7 -> 0x20, 1, 7
46+
// f_memory(uint256[]): 0x80, 9, 9, 9, 2, 7 -> FAILURE
47+
// f_encode(uint256[]): 0x80, 9, 9, 9, 0 -> 0x20, 0x40, 0x20, 0
48+
// f_encode(uint256[]): 0x80, 9, 9, 9, 1, 7 -> 0x20, 0x60, 0x20, 1, 7
49+
// f_encode(uint256[]): 0x80, 9, 9, 9, 2, 7 -> FAILURE
50+
// f_storage(uint256[]): 0x80, 9, 9, 9, 0 -> 0x20, 0x40, 0x20, 0
51+
// f_storage(uint256[]): 0x80, 9, 9, 9, 1, 7 -> 0x20, 0x60, 0x20, 1, 7
52+
// f_storage(uint256[]): 0x80, 9, 9, 9, 2, 7 -> FAILURE
53+
// f_index(uint256[],uint256): 0xa0, 0, 9, 9, 9, 2, 7, 8 -> 7
54+
// f_index(uint256[],uint256): 0xa0, 1, 9, 9, 9, 2, 7, 8 -> 8
55+
// f_index(uint256[],uint256): 0xa0, 2, 9, 9, 9, 2, 7, 8 -> FAILURE, hex"4e487b71", 0x32
56+
// g_memory(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 0 -> 0x60, 1, 2, 0
57+
// g_memory(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 1, 7 -> 0x60, 1, 2, 1, 7
58+
// g_memory(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 2, 7 -> FAILURE
59+
// g_encode(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 0 -> 0x20, 0x80, 0x60, 1, 2, 0
60+
// g_encode(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 1, 7 -> 0x20, 0xa0, 0x60, 1, 2, 1, 7
61+
// g_encode(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 2, 7 -> FAILURE
62+
// g_storage(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 0 -> 0x20, 0x80, 0x60, 1, 2, 0
63+
// g_storage(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 1, 7 -> 0x20, 0xa0, 0x60, 1, 2, 1, 7
64+
// g_storage(uint256[],uint256[2]): 0xc0, 1, 2, 9, 9, 9, 2, 7 -> FAILURE
65+
// g_index(uint256[],uint256[2],uint256): 0xe0, 1, 2, 0, 9, 9, 9, 2, 7, 8 -> 7, 1
66+
// g_index(uint256[],uint256[2],uint256): 0xe0, 1, 2, 1, 9, 9, 9, 2, 7, 8 -> 8, 1
67+
// g_index(uint256[],uint256[2],uint256): 0xe0, 1, 2, 1, 9, 9, 9, 2, 7 -> FAILURE

0 commit comments

Comments
 (0)