Commit 71800503 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-bedrock: fix some compiler warnings (#2839)

also regenerate `op-bindings`
parent c031ec95
---
'@eth-optimism/contracts-bedrock': patch
---
Reduce the number of compiler warnings
This diff is collapsed.
...@@ -11,8 +11,8 @@ GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35328) ...@@ -11,8 +11,8 @@ GasBenchMark_OptimismPortal:test_depositTransaction_benchmark_1() (gas: 35328)
CrossDomainHashing_Test:test_l2TransactionHash() (gas: 104131) CrossDomainHashing_Test:test_l2TransactionHash() (gas: 104131)
DeployerWhitelist_Test:test_owner() (gas: 7625) DeployerWhitelist_Test:test_owner() (gas: 7625)
DeployerWhitelist_Test:test_storageSlots() (gas: 33461) DeployerWhitelist_Test:test_storageSlots() (gas: 33461)
GasPriceOracle_Test:test_baseFee() (gas: 8373) GasPriceOracle_Test:test_baseFee() (gas: 8370)
GasPriceOracle_Test:test_gasPrice() (gas: 8384) GasPriceOracle_Test:test_gasPrice() (gas: 8381)
GasPriceOracle_Test:test_l1BaseFee() (gas: 10626) GasPriceOracle_Test:test_l1BaseFee() (gas: 10626)
GasPriceOracle_Test:test_onlyOwnerSetDecimals() (gas: 10553) GasPriceOracle_Test:test_onlyOwnerSetDecimals() (gas: 10553)
GasPriceOracle_Test:test_onlyOwnerSetOverhead() (gas: 10599) GasPriceOracle_Test:test_onlyOwnerSetOverhead() (gas: 10599)
......
...@@ -113,7 +113,7 @@ contract L1StandardBridge is StandardBridge, Initializable { ...@@ -113,7 +113,7 @@ contract L1StandardBridge is StandardBridge, Initializable {
* *
* @return Address of the corresponding L2 bridge contract. * @return Address of the corresponding L2 bridge contract.
*/ */
function l2TokenBridge() external returns (address) { function l2TokenBridge() external view returns (address) {
return address(otherBridge); return address(otherBridge);
} }
......
...@@ -70,7 +70,7 @@ contract GasPriceOracle is Ownable { ...@@ -70,7 +70,7 @@ contract GasPriceOracle is Ownable {
* *
* @return Current L2 gas price (base fee). * @return Current L2 gas price (base fee).
*/ */
function gasPrice() public returns (uint256) { function gasPrice() public view returns (uint256) {
return block.basefee; return block.basefee;
} }
...@@ -79,7 +79,7 @@ contract GasPriceOracle is Ownable { ...@@ -79,7 +79,7 @@ contract GasPriceOracle is Ownable {
* *
* @return Current L2 base fee. * @return Current L2 base fee.
*/ */
function baseFee() public returns (uint256) { function baseFee() public view returns (uint256) {
return block.basefee; return block.basefee;
} }
......
...@@ -34,7 +34,7 @@ contract L2CrossDomainMessenger is CrossDomainMessenger { ...@@ -34,7 +34,7 @@ contract L2CrossDomainMessenger is CrossDomainMessenger {
* *
* @return Address of the L1CrossDomainMessenger contract. * @return Address of the L1CrossDomainMessenger contract.
*/ */
function l1CrossDomainMessenger() public returns (address) { function l1CrossDomainMessenger() public view returns (address) {
return otherMessenger; return otherMessenger;
} }
......
...@@ -31,7 +31,7 @@ library Burn { ...@@ -31,7 +31,7 @@ library Burn {
* *
* @param _amount Amount of gas to burn. * @param _amount Amount of gas to burn.
*/ */
function gas(uint256 _amount) internal { function gas(uint256 _amount) internal view {
uint256 i = 0; uint256 i = 0;
uint256 initialGas = gasleft(); uint256 initialGas = gasleft();
while (initialGas - gasleft() < _amount) { while (initialGas - gasleft() < _amount) {
......
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