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
06d8ef33
Unverified
Commit
06d8ef33
authored
Nov 30, 2022
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctb: Fix GasPrice Oracle test names
parent
addeaa24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
GasPriceOracle.t.sol
...ges/contracts-bedrock/contracts/test/GasPriceOracle.t.sol
+9
-7
No files found.
packages/contracts-bedrock/contracts/test/GasPriceOracle.t.sol
View file @
06d8ef33
...
@@ -50,31 +50,32 @@ contract GasPriceOracle_Test is CommonTest {
...
@@ -50,31 +50,32 @@ contract GasPriceOracle_Test is CommonTest {
});
});
}
}
function test_l1BaseFee() external {
function test_l1BaseFee
_succeeds
() external {
assertEq(gasOracle.l1BaseFee(), basefee);
assertEq(gasOracle.l1BaseFee(), basefee);
}
}
function test_gasPrice() external {
function test_gasPrice
_succeeds
() external {
vm.fee(100);
vm.fee(100);
uint256 gasPrice = gasOracle.gasPrice();
uint256 gasPrice = gasOracle.gasPrice();
assertEq(gasPrice, 100);
assertEq(gasPrice, 100);
}
}
function test_baseFee() external {
function test_baseFee
_succeeds
() external {
vm.fee(64);
vm.fee(64);
uint256 gasPrice = gasOracle.baseFee();
uint256 gasPrice = gasOracle.baseFee();
assertEq(gasPrice, 64);
assertEq(gasPrice, 64);
}
}
function test_scalar() external {
function test_scalar
_succeeds
() external {
assertEq(gasOracle.scalar(), l1FeeScalar);
assertEq(gasOracle.scalar(), l1FeeScalar);
}
}
function test_overhead() external {
function test_overhead
_succeeds
() external {
assertEq(gasOracle.overhead(), l1FeeOverhead);
assertEq(gasOracle.overhead(), l1FeeOverhead);
}
}
function test_setGasPriceReverts() external {
// Removed in bedrock
function test_setGasPrice_doesNotExist_reverts() external {
(bool success, bytes memory returndata) = address(gasOracle).call(
(bool success, bytes memory returndata) = address(gasOracle).call(
abi.encodeWithSignature("setGasPrice(uint256)", 1)
abi.encodeWithSignature("setGasPrice(uint256)", 1)
);
);
...
@@ -83,7 +84,8 @@ contract GasPriceOracle_Test is CommonTest {
...
@@ -83,7 +84,8 @@ contract GasPriceOracle_Test is CommonTest {
assertEq(returndata, hex"");
assertEq(returndata, hex"");
}
}
function test_setL1BaseFeeReverts() external {
// Removed in bedrock
function test_setL1BaseFee_doesNotExist_reverts() external {
(bool success, bytes memory returndata) = address(gasOracle).call(
(bool success, bytes memory returndata) = address(gasOracle).call(
abi.encodeWithSignature("setL1BaseFee(uint256)", 1)
abi.encodeWithSignature("setL1BaseFee(uint256)", 1)
);
);
...
...
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