solidity/test/libsolidity/semanticTests/state/block_timestamp.sol

13 lines
318 B
Solidity
Raw Normal View History

contract C {
constructor() {}
function f() public returns (uint) {
return block.timestamp;
}
}
// ====
// compileViaYul: also
// ----
// constructor() # This is the 1st block #
// f() -> 0x1e # This is the 2nd block (each block is "15 seconds") #
// f() -> 0x2d # This is the 3rd block #