Commit 0ed8dca8 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: more cleanup

parent 31ac6d98
...@@ -418,7 +418,7 @@ SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 163228) ...@@ -418,7 +418,7 @@ SequencerFeeVault_Test:test_withdraw_succeeds() (gas: 163228)
SetPrevBaseFee_Test:test_setPrevBaseFee_succeeds() (gas: 11515) SetPrevBaseFee_Test:test_setPrevBaseFee_succeeds() (gas: 11515)
StandardBridge_Stateless_Test:test_isCorrectTokenPair_succeeds() (gas: 49936) StandardBridge_Stateless_Test:test_isCorrectTokenPair_succeeds() (gas: 49936)
StandardBridge_Stateless_Test:test_isOptimismMintableERC20_succeeds() (gas: 33072) StandardBridge_Stateless_Test:test_isOptimismMintableERC20_succeeds() (gas: 33072)
SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 148894) SystemConfig_Initialize_TestFail:test_initialize_lowGasLimit_reverts() (gas: 148858)
SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10546) SystemConfig_Setters_TestFail:test_setBatcherHash_notOwner_reverts() (gas: 10546)
SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10622) SystemConfig_Setters_TestFail:test_setGasConfig_notOwner_reverts() (gas: 10622)
SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10615) SystemConfig_Setters_TestFail:test_setGasLimit_notOwner_reverts() (gas: 10615)
......
...@@ -21,14 +21,12 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -21,14 +21,12 @@ contract SystemConfig is OwnableUpgradeable, Semver {
* @custom:value GAS_LIMIT Represents an update to gas limit on L2. * @custom:value GAS_LIMIT Represents an update to gas limit on L2.
* @custom:value UNSAFE_BLOCK_SIGNER Represents an update to the signer key for unsafe * @custom:value UNSAFE_BLOCK_SIGNER Represents an update to the signer key for unsafe
* block distrubution. * block distrubution.
* @custom:value RESOURCE_CONFIG Represents an update to the resource config.
*/ */
enum UpdateType { enum UpdateType {
BATCHER, BATCHER,
GAS_CONFIG, GAS_CONFIG,
GAS_LIMIT, GAS_LIMIT,
UNSAFE_BLOCK_SIGNER, UNSAFE_BLOCK_SIGNER
RESOURCE_CONFIG
} }
/** /**
...@@ -269,14 +267,14 @@ contract SystemConfig is OwnableUpgradeable, Semver { ...@@ -269,14 +267,14 @@ contract SystemConfig is OwnableUpgradeable, Semver {
} }
/** /**
* @notice An external setter for the resource config. * @notice An external setter for the resource config. In the future, this
* method may emit an event that the `op-node` picks up for when the
* resource config is changed.
*
* @param _config The new resource config values. * @param _config The new resource config values.
*/ */
function setResourceConfig(ResourceConfig memory _config) external onlyOwner { function setResourceConfig(ResourceConfig memory _config) external onlyOwner {
_setResourceConfig(_config); _setResourceConfig(_config);
bytes memory data = abi.encode(_config);
emit ConfigUpdate(VERSION, UpdateType.RESOURCE_CONFIG, data);
} }
/** /**
......
...@@ -100,6 +100,8 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -100,6 +100,8 @@ const deployFn: DeployFunction = async (hre) => {
), ),
gasLimit: hre.deployConfig.l2GenesisBlockGasLimit, gasLimit: hre.deployConfig.l2GenesisBlockGasLimit,
unsafeBlockSigner: hre.deployConfig.p2pSequencerAddress, unsafeBlockSigner: hre.deployConfig.p2pSequencerAddress,
// The resource config is not exposed to the end user
// to simplify deploy config. It may be introduced in the future.
resourceConfig: { resourceConfig: {
maxResourceLimit: 20_000_000, maxResourceLimit: 20_000_000,
elasticityMultiplier: 10, elasticityMultiplier: 10,
......
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