@@ -153,6 +153,106 @@ Logged when gas is submitted for processing (e.g., via subsidy program).
153153- ` subsidyProgram ` : Which subsidy program (if applicable)
154154- ` status ` : Submission status
155155
156+ ### 7. Configuration Update (` ConfigUpdate ` )
157+ Logged when system configuration is updated by an administrator.
158+
159+ ** Fields in details:**
160+ - ` configType ` : Type of configuration being updated (e.g., "rate-limits", "alert-thresholds", "rpc-providers")
161+ - ` changes ` : Object containing the configuration changes made
162+ - ` target ` : Target of the configuration change (e.g., chain ID, "global", specific component)
163+
164+ ** Example:**
165+ ``` json
166+ {
167+ "eventType" : " ConfigUpdate" ,
168+ "timestamp" : " 2024-02-23T14:30:00Z" ,
169+ "user" : " admin_user_123" ,
170+ "outcome" : " success" ,
171+ "details" : {
172+ "configType" : " alert-thresholds" ,
173+ "changes" : {
174+ "gasSpikeThreshold" : 150 ,
175+ "volatilityThreshold" : 25
176+ },
177+ "target" : " chain-1"
178+ }
179+ }
180+ ```
181+
182+ ### 8. Role Change (` RoleChange ` )
183+ Logged when user roles are modified by an administrator.
184+
185+ ** Fields in details:**
186+ - ` targetUser ` : User whose role is being changed
187+ - ` action ` : Type of role change ("grant", "revoke", "update")
188+ - ` role ` : The role being granted/revoked/updated
189+ - ` previousRole ` : Previous role (for updates)
190+
191+ ** Example:**
192+ ``` json
193+ {
194+ "eventType" : " RoleChange" ,
195+ "timestamp" : " 2024-02-23T15:45:00Z" ,
196+ "user" : " admin_user_123" ,
197+ "outcome" : " success" ,
198+ "details" : {
199+ "targetUser" : " user_456" ,
200+ "action" : " grant" ,
201+ "role" : " admin" ,
202+ "previousRole" : " operator"
203+ }
204+ }
205+ ```
206+
207+ ### 9. Treasury Operation (` TreasuryOperation ` )
208+ Logged for treasury-related operations performed by administrators.
209+
210+ ** Fields in details:**
211+ - ` operation ` : Type of treasury operation (e.g., "withdraw", "deposit", "transfer")
212+ - ` amount ` : Amount involved in the operation
213+ - ` asset ` : Asset type (e.g., "ETH", "USDC", "gas-tokens")
214+ - ` recipient ` : Recipient address or identifier
215+ - Additional operation-specific details
216+
217+ ** Example:**
218+ ``` json
219+ {
220+ "eventType" : " TreasuryOperation" ,
221+ "timestamp" : " 2024-02-23T16:20:00Z" ,
222+ "user" : " admin_user_123" ,
223+ "outcome" : " success" ,
224+ "details" : {
225+ "operation" : " withdraw" ,
226+ "amount" : " 1000" ,
227+ "asset" : " ETH" ,
228+ "recipient" : " 0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
229+ }
230+ }
231+ ```
232+
233+ ### 10. System Administration (` SystemAdmin ` )
234+ Logged for general system administration actions.
235+
236+ ** Fields in details:**
237+ - ` action ` : Administrative action performed (e.g., "force-refresh", "system-restart", "maintenance-mode")
238+ - ` target ` : Target of the administrative action
239+ - Additional action-specific details
240+
241+ ** Example:**
242+ ``` json
243+ {
244+ "eventType" : " SystemAdmin" ,
245+ "timestamp" : " 2024-02-23T17:00:00Z" ,
246+ "user" : " admin_user_123" ,
247+ "outcome" : " success" ,
248+ "details" : {
249+ "action" : " force-refresh" ,
250+ "target" : " gas-price-data" ,
251+ "reason" : " Manual data refresh requested"
252+ }
253+ }
254+ ```
255+
156256## Database Schema
157257
158258### audit_logs Table
@@ -201,7 +301,7 @@ Logged when gas is submitted for processing (e.g., via subsidy program).
201301Retrieve audit logs with filtering and pagination.
202302
203303** Query Parameters:**
204- - ` eventType ` (string): Filter by event type (APIRequest, KeyCreated, KeyRotated, KeyRevoked, GasTransaction, GasSubmission)
304+ - ` eventType ` (string): Filter by event type (APIRequest, KeyCreated, KeyRotated, KeyRevoked, GasTransaction, GasSubmission, ConfigUpdate, RoleChange, TreasuryOperation, SystemAdmin )
205305- ` user ` (string): Filter by user/merchant ID
206306- ` apiKey ` (string): Filter by API key
207307- ` chainId ` (integer): Filter by blockchain chain ID
@@ -339,7 +439,11 @@ Retrieve high-level audit statistics.
339439 "GasTransaction" : 3000 ,
340440 "KeyRotated" : 200 ,
341441 "KeyRevoked" : 50 ,
342- "GasSubmission" : 32
442+ "GasSubmission" : 32 ,
443+ "ConfigUpdate" : 45 ,
444+ "RoleChange" : 12 ,
445+ "TreasuryOperation" : 8 ,
446+ "SystemAdmin" : 23
343447 }
344448}
345449```
0 commit comments