Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
19923310
Commit
19923310
authored
Nov 04, 2022
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: remove ownable from GasPriceOracle
The `onlyOwner` modifier was no longer used
parent
c6f06eef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
GasPriceOracle.sol
packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol
+9
-7
GasPriceOracle.t.sol
...ges/contracts-bedrock/contracts/test/GasPriceOracle.t.sol
+1
-8
layout-lock.json
packages/contracts-bedrock/layout-lock.json
+5
-0
No files found.
packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol
View file @
19923310
...
...
@@ -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
...
...
packages/contracts-bedrock/contracts/test/GasPriceOracle.t.sol
View file @
19923310
...
...
@@ -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)
);
...
...
packages/contracts-bedrock/layout-lock.json
View file @
19923310
{
"GasPriceOracle"
:
{
"spacer_0_0_32"
:
{
"slot"
:
0
,
"offset"
:
0
,
"length"
:
32
},
"spacer_1_0_32"
:
{
"slot"
:
1
,
"offset"
:
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment