mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
19 lines
322 B
Solidity
19 lines
322 B
Solidity
|
contract C {
|
||
|
function f() public view returns (uint) {
|
||
|
return block.basefee;
|
||
|
}
|
||
|
function g() public view returns (uint ret) {
|
||
|
assembly {
|
||
|
ret := basefee()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
// ====
|
||
|
// EVMVersion: >=london
|
||
|
// compileViaYul: also
|
||
|
// ----
|
||
|
// f() -> 7
|
||
|
// g() -> 7
|
||
|
// f() -> 7
|
||
|
// g() -> 7
|