mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 15:11:02 +00:00
implement the coinbase opcode (#179)
Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8;
|
||||
|
||||
/* runner.json
|
||||
{
|
||||
"differential": true,
|
||||
"actions": [
|
||||
{
|
||||
"Instantiate": {
|
||||
"code": {
|
||||
"Solidity": {
|
||||
"contract": "Coinbase"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
|
||||
contract Coinbase {
|
||||
constructor() payable {
|
||||
address coinbase = address(0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF);
|
||||
assert(block.coinbase == coinbase);
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,7 @@ test_spec!(gas_price, "GasPrice", "GasPrice.sol");
|
||||
test_spec!(gas_left, "GasLeft", "GasLeft.sol");
|
||||
test_spec!(gas_limit, "GasLimit", "GasLimit.sol");
|
||||
test_spec!(base_fee, "BaseFee", "BaseFee.sol");
|
||||
test_spec!(coinbase, "Coinbase", "Coinbase.sol");
|
||||
|
||||
fn instantiate(path: &str, contract: &str) -> Vec<SpecsAction> {
|
||||
vec![Instantiate {
|
||||
|
||||
Reference in New Issue
Block a user