Implement ABI encoding of calldata arrays and structs.

This commit is contained in:
Daniel Kirchner
2019-04-04 13:05:32 +02:00
parent d82157d46a
commit 91a2a9a9c3
19 changed files with 531 additions and 25 deletions
@@ -0,0 +1,18 @@
pragma experimental ABIEncoderV2;
contract C {
struct S { uint256 a; }
function f(S calldata s) external returns (bytes memory) {
return abi.encode(s);
}
function g(S calldata s) external returns (bytes memory) {
return this.f(s);
}
}
// ====
// EVMVersion: >homestead
// ----
// f((uint256)): 3 -> 32, 32, 3
// g((uint256)): 3 -> 32, 32, 3