mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
21 lines
412 B
Solidity
21 lines
412 B
Solidity
|
contract C {
|
||
|
function f() public view returns (uint256 ret) {
|
||
|
assembly {
|
||
|
let prevrandao := sload(0)
|
||
|
ret := prevrandao
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function g() public pure returns (uint256 ret) {
|
||
|
assembly {
|
||
|
function prevrandao() -> r {
|
||
|
r := 1000
|
||
|
}
|
||
|
ret := prevrandao()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
// ====
|
||
|
// EVMVersion: <paris
|
||
|
// ----
|