Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nice-meals-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/contracts-bedrock': patch
---

Reduce the number of compiler warnings
106 changes: 63 additions & 43 deletions op-bindings/bindings/gaspriceoracle.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/contracts-bedrock/.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -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: 8373)
GasPriceOracle_Test:test_gasPrice() (gas: 8384)
GasPriceOracle_Test:test_baseFee() (gas: 8370)
GasPriceOracle_Test:test_gasPrice() (gas: 8381)
GasPriceOracle_Test:test_l1BaseFee() (gas: 10626)
GasPriceOracle_Test:test_onlyOwnerSetDecimals() (gas: 10553)
GasPriceOracle_Test:test_onlyOwnerSetOverhead() (gas: 10599)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/contracts/libraries/Burn.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down