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
71800503
Unverified
Commit
71800503
authored
Jul 06, 2022
by
Mark Tyneway
Committed by
GitHub
Jul 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: fix some compiler warnings (#2839)
also regenerate `op-bindings`
parent
c031ec95
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
50 deletions
+75
-50
nice-meals-visit.md
.changeset/nice-meals-visit.md
+5
-0
gaspriceoracle.go
op-bindings/bindings/gaspriceoracle.go
+63
-43
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+2
-2
L1StandardBridge.sol
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
+1
-1
GasPriceOracle.sol
packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol
+2
-2
L2CrossDomainMessenger.sol
...contracts-bedrock/contracts/L2/L2CrossDomainMessenger.sol
+1
-1
Burn.sol
packages/contracts-bedrock/contracts/libraries/Burn.sol
+1
-1
No files found.
.changeset/nice-meals-visit.md
0 → 100644
View file @
71800503
---
'
@eth-optimism/contracts-bedrock'
:
patch
---
Reduce the number of compiler warnings
op-bindings/bindings/gaspriceoracle.go
View file @
71800503
This diff is collapsed.
Click to expand it.
packages/contracts-bedrock/.gas-snapshot
View file @
71800503
...
...
@@ -11,8 +11,8 @@ GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35328)
CrossDomainHashing_Test:test_l2TransactionHash() (gas: 104131)
DeployerWhitelist_Test:test_owner() (gas: 7625)
DeployerWhitelist_Test:test_storageSlots() (gas: 33461)
GasPriceOracle_Test:test_baseFee() (gas: 837
3
)
GasPriceOracle_Test:test_gasPrice() (gas: 838
4
)
GasPriceOracle_Test:test_baseFee() (gas: 837
0
)
GasPriceOracle_Test:test_gasPrice() (gas: 838
1
)
GasPriceOracle_Test:test_l1BaseFee() (gas: 10626)
GasPriceOracle_Test:test_onlyOwnerSetDecimals() (gas: 10553)
GasPriceOracle_Test:test_onlyOwnerSetOverhead() (gas: 10599)
...
...
packages/contracts-bedrock/contracts/L1/L1StandardBridge.sol
View file @
71800503
...
...
@@ -113,7 +113,7 @@ contract L1StandardBridge is StandardBridge, Initializable {
*
* @return Address of the corresponding L2 bridge contract.
*/
function l2TokenBridge() external returns (address) {
function l2TokenBridge() external
view
returns (address) {
return address(otherBridge);
}
...
...
packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol
View file @
71800503
...
...
@@ -70,7 +70,7 @@ contract GasPriceOracle is Ownable {
*
* @return Current L2 gas price (base fee).
*/
function gasPrice() public returns (uint256) {
function gasPrice() public
view
returns (uint256) {
return block.basefee;
}
...
...
@@ -79,7 +79,7 @@ contract GasPriceOracle is Ownable {
*
* @return Current L2 base fee.
*/
function baseFee() public returns (uint256) {
function baseFee() public
view
returns (uint256) {
return block.basefee;
}
...
...
packages/contracts-bedrock/contracts/L2/L2CrossDomainMessenger.sol
View file @
71800503
...
...
@@ -34,7 +34,7 @@ contract L2CrossDomainMessenger is CrossDomainMessenger {
*
* @return Address of the L1CrossDomainMessenger contract.
*/
function l1CrossDomainMessenger() public returns (address) {
function l1CrossDomainMessenger() public
view
returns (address) {
return otherMessenger;
}
...
...
packages/contracts-bedrock/contracts/libraries/Burn.sol
View file @
71800503
...
...
@@ -31,7 +31,7 @@ library Burn {
*
* @param _amount Amount of gas to burn.
*/
function gas(uint256 _amount) internal {
function gas(uint256 _amount) internal
view
{
uint256 i = 0;
uint256 initialGas = gasleft();
while (initialGas - gasleft() < _amount) {
...
...
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