mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-09 20:01:05 +00:00
Implement the gasprice opcode (#127)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8;
|
||||
|
||||
/* runner.json
|
||||
{
|
||||
"differential": false,
|
||||
"actions": [
|
||||
{
|
||||
"Instantiate": {
|
||||
"code": {
|
||||
"Solidity": {
|
||||
"contract": "GasPrice"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"VerifyCall": {
|
||||
"success": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
|
||||
contract GasPrice {
|
||||
constructor() payable {
|
||||
assert(tx.gasprice == 1);
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,7 @@ test_spec!(immutables, "Immutables", "Immutables.sol");
|
||||
test_spec!(transaction, "Transaction", "Transaction.sol");
|
||||
test_spec!(block_hash, "BlockHash", "BlockHash.sol");
|
||||
test_spec!(delegate, "Delegate", "Delegate.sol");
|
||||
test_spec!(gas_price, "GasPrice", "GasPrice.sol");
|
||||
|
||||
fn instantiate(path: &str, contract: &str) -> Vec<SpecsAction> {
|
||||
vec![Instantiate {
|
||||
|
||||
Reference in New Issue
Block a user