Commit 19923310 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: remove ownable from GasPriceOracle

The `onlyOwner` modifier was no longer used
parent c6f06eef
......@@ -2,7 +2,6 @@
pragma solidity 0.8.15;
import { Semver } from "../universal/Semver.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Predeploys } from "../libraries/Predeploys.sol";
import { L1Block } from "../L2/L1Block.sol";
......@@ -16,7 +15,14 @@ import { L1Block } from "../L2/L1Block.sol";
* contract exposes an API that is useful for knowing how large the L1 portion of their
* transaction fee will be.
*/
contract GasPriceOracle is Ownable, Semver {
contract GasPriceOracle is Semver {
/**
* @custom:legacy
* @custom:spacer _owner
* @notice Spacer for backwards compatibility.
*/
uint256 private spacer_0_0_32;
/**
* @custom:legacy
* @custom:spacer gasPrice
......@@ -67,12 +73,8 @@ contract GasPriceOracle is Ownable, Semver {
/**
* @custom:semver 0.0.1
*
* @param _owner Address that will initially own this contract.
*/
constructor(address _owner) Ownable() Semver(0, 0, 1) {
transferOwnership(_owner);
}
constructor() Semver(0, 0, 1) {}
/**
* @notice Computes the L1 portion of the fee based on the size of the rlp encoded input
......
......@@ -35,7 +35,7 @@ contract GasPriceOracle_Test is CommonTest {
// We are not setting the gas oracle at its predeploy
// address for simplicity purposes. Nothing in this test
// requires it to be at a particular address
gasOracle = new GasPriceOracle(alice);
gasOracle = new GasPriceOracle();
vm.prank(depositor);
l1Block.setL1BlockValues({
......@@ -50,11 +50,6 @@ contract GasPriceOracle_Test is CommonTest {
});
}
function test_owner() external {
// alice is passed into the constructor of the gasOracle
assertEq(gasOracle.owner(), alice);
}
function test_l1BaseFee() external {
assertEq(gasOracle.l1BaseFee(), basefee);
}
......@@ -80,7 +75,6 @@ contract GasPriceOracle_Test is CommonTest {
}
function test_setGasPriceReverts() external {
vm.prank(gasOracle.owner());
(bool success, bytes memory returndata) = address(gasOracle).call(
abi.encodeWithSignature("setGasPrice(uint256)", 1)
);
......@@ -90,7 +84,6 @@ contract GasPriceOracle_Test is CommonTest {
}
function test_setL1BaseFeeReverts() external {
vm.prank(gasOracle.owner());
(bool success, bytes memory returndata) = address(gasOracle).call(
abi.encodeWithSignature("setL1BaseFee(uint256)", 1)
);
......
{
"GasPriceOracle": {
"spacer_0_0_32": {
"slot": 0,
"offset": 0,
"length": 32
},
"spacer_1_0_32": {
"slot": 1,
"offset": 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment