Files
revive/crates/integration/contracts/Block.sol
T
Cyrill Leutwiler d2f76b645f switch to pallet_revive runtime (#40)
Signed-off-by: xermicus <cyrill@parity.io>
2024-09-03 17:18:22 +02:00

51 lines
974 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8;
/* runner.json
{
"differential": true,
"actions": [
{
"Instantiate": {
"code": {
"Solidity": {
"contract": "Block"
}
}
}
},
{
"Call": {
"dest": {
"Instantiated": 0
},
"data": "8381f58a"
}
},
{
"Call": {
"dest": {
"Instantiated": 0
},
"data": "b80777ea"
}
}
]
}
*/
contract Block {
function timestamp() public view returns (uint ret) {
ret = block.timestamp;
}
function number() public view returns (uint ret) {
if (block.number == 0) {
ret = 1;
} else {
ret = block.number;
}
}
}