510f980348
* add itests for various fevm block properties and assert correct chain id * add value checks to the block property solidity itests * move get block function to kit
25 lines
573 B
Solidity
25 lines
573 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity >=0.8.17;
|
|
|
|
contract BlockTest {
|
|
|
|
function testChainID() public view{
|
|
require(block.chainid == 314);
|
|
}
|
|
|
|
function getBlockhashPrevious() public view returns (bytes32) {
|
|
return blockhash(block.number-1);
|
|
}
|
|
|
|
function getBasefee() public view returns (uint256){
|
|
return block.basefee;
|
|
}
|
|
|
|
function getBlockNumber() public view returns (uint256){
|
|
return block.number;
|
|
}
|
|
function getTimestamp() public view returns (uint256){
|
|
return block.timestamp;
|
|
}
|
|
}
|