2020-03-09 21:14:07 +00:00
|
|
|
// Sending zero ether to a contract should still invoke the receive ether function
|
|
|
|
// (it previously did not because the gas stipend was not provided by the EVM)
|
|
|
|
contract Receiver {
|
|
|
|
receive() external payable {}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract Main {
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor() payable {}
|
2020-03-09 21:14:07 +00:00
|
|
|
|
|
|
|
function s() public returns (bool) {
|
|
|
|
Receiver r = new Receiver();
|
2020-12-14 15:51:07 +00:00
|
|
|
return payable(r).send(0);
|
2020-03-09 21:14:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-17 20:24:33 +00:00
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// constructor(), 20 wei ->
|
2022-03-15 16:25:35 +00:00
|
|
|
// gas irOptimized: 100264
|
2021-11-15 15:19:33 +00:00
|
|
|
// gas legacy: 116691
|
|
|
|
// gas legacyOptimized: 100361
|
2020-03-09 21:14:07 +00:00
|
|
|
// s() -> true
|