@@ -4,6 +4,25 @@ pragma solidity =0.8.24;
44import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol " ;
55
66contract SystemConfig is OwnableUpgradeable {
7+ /**********
8+ * Events *
9+ **********/
10+
11+ /// @notice Emitted when the message queue parameters are updated.
12+ /// @param oldParams The old parameters.
13+ /// @param newParams The new parameters.
14+ event MessageQueueParametersUpdated (MessageQueueParameters oldParams , MessageQueueParameters newParams );
15+
16+ /// @notice Emitted when the enforced batch parameters are updated.
17+ /// @param oldParams The old parameters.
18+ /// @param newParams The new parameters.
19+ event EnforcedBatchParametersUpdated (EnforcedBatchParameters oldParams , EnforcedBatchParameters newParams );
20+
21+ /// @notice Emitted when the signer is updated.
22+ /// @param oldSigner The old signer.
23+ /// @param newSigner The new signer.
24+ event SignerUpdated (address oldSigner , address newSigner );
25+
726 /***********
827 * Structs *
928 ***********/
@@ -83,20 +102,26 @@ contract SystemConfig is OwnableUpgradeable {
83102 /// @param _params The new message queue parameters.
84103 /// @dev Only the owner can call this function.
85104 function updateMessageQueueParameters (MessageQueueParameters memory _params ) external onlyOwner {
105+ MessageQueueParameters memory oldParams = messageQueueParameters;
86106 messageQueueParameters = _params;
107+ emit MessageQueueParametersUpdated (oldParams, _params);
87108 }
88109
89110 /// @notice Update the enforced batch parameters.
90111 /// @param _params The new enforced batch parameters.
91112 /// @dev Only the owner can call this function.
92113 function updateEnforcedBatchParameters (EnforcedBatchParameters memory _params ) external onlyOwner {
114+ EnforcedBatchParameters memory oldParams = enforcedBatchParameters;
93115 enforcedBatchParameters = _params;
116+ emit EnforcedBatchParametersUpdated (oldParams, _params);
94117 }
95118
96119 /// @notice Update the current signer.
97120 /// @param _newSigner The address of the new authorized signer.
98121 /// @dev Only the owner can call this function.
99122 function updateSigner (address _newSigner ) external onlyOwner {
123+ address oldSigner = currentSigner;
100124 currentSigner = _newSigner;
125+ emit SignerUpdated (oldSigner, _newSigner);
101126 }
102127}
0 commit comments