solidity/test/libsolidity/semanticTests/various/value_complex.sol
Matheus Aguiar 562b6ea7a8 Update tests
2023-08-24 15:33:21 -03:00

26 lines
563 B
Solidity

contract helper {
function getBalance() public payable returns (uint256 myBalance) {
return address(this).balance;
}
}
contract test {
helper h;
constructor() payable {
h = new helper();
}
function sendAmount(uint256 amount) public payable returns (uint256 bal) {
uint256 someStackElement = 20;
return h.getBalance{value: amount + 3, gas: 1000}();
}
}
// ----
// constructor(), 20 wei ->
// gas irOptimized: 173055
// gas legacy: 252295
// gas legacyOptimized: 181660
// sendAmount(uint256): 5 -> 8