2020-11-23 18:06:44 +00:00
|
|
|
pragma abicoder v2;
|
2019-08-07 17:21:32 +00:00
|
|
|
|
|
|
|
contract C {
|
2019-08-14 19:05:26 +00:00
|
|
|
function d() public {
|
|
|
|
}
|
2019-08-07 17:21:32 +00:00
|
|
|
function e() public payable returns (uint) {
|
|
|
|
return msg.value;
|
|
|
|
}
|
|
|
|
function f(uint a) public pure returns (uint, uint) {
|
|
|
|
return (a, a);
|
|
|
|
}
|
|
|
|
function g() public pure returns (uint, uint) {
|
|
|
|
return (2, 3);
|
|
|
|
}
|
|
|
|
function h(uint x, uint y) public pure returns (uint) {
|
2020-09-15 14:16:30 +00:00
|
|
|
unchecked { return x - y; }
|
2019-08-07 17:21:32 +00:00
|
|
|
}
|
|
|
|
function i(bool b) public pure returns (bool) {
|
|
|
|
return !b;
|
|
|
|
}
|
|
|
|
function j(bytes32 b) public pure returns (bytes32, bytes32) {
|
|
|
|
return (b, b);
|
|
|
|
}
|
|
|
|
function k() public pure returns (uint) {
|
|
|
|
return msg.data.length;
|
|
|
|
}
|
|
|
|
function l(uint a) public pure returns (uint d) {
|
|
|
|
return a * 7;
|
|
|
|
}
|
|
|
|
}
|
2020-09-15 14:16:30 +00:00
|
|
|
// ====
|
2021-04-23 15:59:01 +00:00
|
|
|
// compileToEwasm: also
|
2019-08-07 17:21:32 +00:00
|
|
|
// ----
|
2019-08-14 19:05:26 +00:00
|
|
|
// d() ->
|
2020-02-18 11:57:48 +00:00
|
|
|
// e(), 1 wei -> 1
|
|
|
|
// e(), 1 ether -> 1000000000000000000
|
2019-08-07 17:21:32 +00:00
|
|
|
// f(uint256): 3 -> 3, 3
|
|
|
|
// g() -> 2, 3
|
|
|
|
// h(uint256,uint256): 1, -2 -> 3
|
|
|
|
// i(bool): true -> false
|
|
|
|
// j(bytes32): 0x10001 -> 0x10001, 0x10001
|
|
|
|
// k(): hex"4200efef" -> 8
|
|
|
|
// l(uint256): 99 -> 693
|