Commit d39a7a61 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: lint

parent ce50852a
...@@ -212,7 +212,12 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver { ...@@ -212,7 +212,12 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
* *
* @return ResourceMetering.ResourceConfig * @return ResourceMetering.ResourceConfig
*/ */
function _resourceConfig() internal view override returns (ResourceMetering.ResourceConfig memory) { function _resourceConfig()
internal
view
override
returns (ResourceMetering.ResourceConfig memory)
{
return SYSTEM_CONFIG.resourceConfig(); return SYSTEM_CONFIG.resourceConfig();
} }
......
...@@ -39,7 +39,8 @@ abstract contract ResourceMetering is Initializable { ...@@ -39,7 +39,8 @@ abstract contract ResourceMetering is Initializable {
* @custom:field elasticityMultiplier Determines the target resource limit along with * @custom:field elasticityMultiplier Determines the target resource limit along with
* the resource limit. * the resource limit.
* @custom:field baseFeeMaxChangeDenominator Determines max change on fee per block. * @custom:field baseFeeMaxChangeDenominator Determines max change on fee per block.
* @custom:field minimumBaseFee The min deposit base fee, it is clamped to this value. * @custom:field minimumBaseFee The min deposit base fee, it is clamped to this
* value.
* @custom:field systemTxMaxGas The amount of gas supplied to the system * @custom:field systemTxMaxGas The amount of gas supplied to the system
* transaction. This should be set to the same number * transaction. This should be set to the same number
* that the op-node sets as the gas limit for the * that the op-node sets as the gas limit for the
...@@ -56,7 +57,6 @@ abstract contract ResourceMetering is Initializable { ...@@ -56,7 +57,6 @@ abstract contract ResourceMetering is Initializable {
uint128 maximumBaseFee; uint128 maximumBaseFee;
} }
/** /**
* @notice EIP-1559 style gas parameters. * @notice EIP-1559 style gas parameters.
*/ */
......
...@@ -148,6 +148,7 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -148,6 +148,7 @@ contract SystemConfig is OwnableUpgradeable, Semver {
_setResourceConfig(_config); _setResourceConfig(_config);
require(_gasLimit >= minimumGasLimit(), "SystemConfig: gas limit too low"); require(_gasLimit >= minimumGasLimit(), "SystemConfig: gas limit too low");
} }
/** /**
* @notice Returns the minimum L2 gas limit that can be safely set for the system to * @notice Returns the minimum L2 gas limit that can be safely set for the system to
* operate. The L2 gas limit must be larger than or equal to the amount of * operate. The L2 gas limit must be larger than or equal to the amount of
......
...@@ -29,7 +29,12 @@ contract EchidnaFuzzResourceMetering is ResourceMetering, StdUtils { ...@@ -29,7 +29,12 @@ contract EchidnaFuzzResourceMetering is ResourceMetering, StdUtils {
return _resourceConfig(); return _resourceConfig();
} }
function _resourceConfig() internal pure override returns (ResourceMetering.ResourceConfig memory) { function _resourceConfig()
internal
pure
override
returns (ResourceMetering.ResourceConfig memory)
{
ResourceMetering.ResourceConfig memory rcfg = Constants.DEFAULT_RESOURCE_CONFIG(); ResourceMetering.ResourceConfig memory rcfg = Constants.DEFAULT_RESOURCE_CONFIG();
return rcfg; return rcfg;
} }
......
...@@ -31,7 +31,11 @@ library Constants { ...@@ -31,7 +31,11 @@ library Constants {
* @notice Returns the default values for the ResourceConfig. These are the recommended values * @notice Returns the default values for the ResourceConfig. These are the recommended values
* for a production network. * for a production network.
*/ */
function DEFAULT_RESOURCE_CONFIG() internal pure returns (ResourceMetering.ResourceConfig memory) { function DEFAULT_RESOURCE_CONFIG()
internal
pure
returns (ResourceMetering.ResourceConfig memory)
{
ResourceMetering.ResourceConfig memory config = ResourceMetering.ResourceConfig({ ResourceMetering.ResourceConfig memory config = ResourceMetering.ResourceConfig({
maxResourceLimit: 20_000_000, maxResourceLimit: 20_000_000,
elasticityMultiplier: 10, elasticityMultiplier: 10,
......
...@@ -19,7 +19,12 @@ contract MeterUser is ResourceMetering { ...@@ -19,7 +19,12 @@ contract MeterUser is ResourceMetering {
return _resourceConfig(); return _resourceConfig();
} }
function _resourceConfig() internal pure override returns (ResourceMetering.ResourceConfig memory) { function _resourceConfig()
internal
pure
override
returns (ResourceMetering.ResourceConfig memory)
{
return Constants.DEFAULT_RESOURCE_CONFIG(); return Constants.DEFAULT_RESOURCE_CONFIG();
} }
...@@ -176,7 +181,12 @@ contract CustomMeterUser is ResourceMetering { ...@@ -176,7 +181,12 @@ contract CustomMeterUser is ResourceMetering {
}); });
} }
function _resourceConfig() internal pure override returns (ResourceMetering.ResourceConfig memory) { function _resourceConfig()
internal
pure
override
returns (ResourceMetering.ResourceConfig memory)
{
return Constants.DEFAULT_RESOURCE_CONFIG(); return Constants.DEFAULT_RESOURCE_CONFIG();
} }
......
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