2020-11-23 18:06:44 +00:00
|
|
|
pragma abicoder v2;
|
2019-03-15 13:47:17 +00:00
|
|
|
|
|
|
|
contract C {
|
|
|
|
struct S { uint256[] a; }
|
|
|
|
function f(S[] calldata s) external pure returns (bytes memory) {
|
|
|
|
return abi.encode(s);
|
|
|
|
}
|
|
|
|
function g(S[] calldata s) external view returns (bytes memory) {
|
|
|
|
return this.f(s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
|
|
|
// EVMVersion: >homestead
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileViaYul: also
|
2019-03-15 13:47:17 +00:00
|
|
|
// ----
|
|
|
|
// f((uint256[])[]): 32, 1, 32, 32, 3, 17, 42, 23 -> 32, 256, 32, 1, 32, 32, 3, 17, 42, 23
|
|
|
|
// g((uint256[])[]): 32, 1, 32, 32, 3, 17, 42, 23 -> 32, 256, 32, 1, 32, 32, 3, 17, 42, 23
|