solidity/test/libsolidity/semanticTests/constructor/constructor_arguments_external.sol
Daniel Kirchner 44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00

25 lines
450 B
Solidity

contract Main {
bytes3 name;
bool flag;
constructor(bytes3 x, bool f) {
name = x;
flag = f;
}
function getName() public returns (bytes3 ret) {
return name;
}
function getFlag() public returns (bool ret) {
return flag;
}
}
// ----
// constructor(): "abc", true
// gas irOptimized: 105906
// gas legacy: 143300
// gas legacyOptimized: 102961
// getFlag() -> true
// getName() -> "abc"