Label: complexity: high
Points: 200
Description
Production contracts need structured observability for real-time monitoring dashboards. This issue adds a comprehensive monitoring event emitted on every state change — monitor_event with fields for function name, invoice ID, actor, gas used estimate, and timestamp — enabling real-time contract health observability.
Technical Context
Involves events.rs — add monitor_event(env, function: Symbol, invoice_id: u64, actor: &Address, timestamp: u64). Call from every public entry point in lib.rs (create_invoice, pay, release, refund) as the first operation. Use topic (symbol_short!("monitor"), function) for easy filtering.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Production contracts need structured observability for real-time monitoring dashboards. This issue adds a comprehensive monitoring event emitted on every state change —
monitor_eventwith fields for function name, invoice ID, actor, gas used estimate, and timestamp — enabling real-time contract health observability.Technical Context
Involves
events.rs— addmonitor_event(env, function: Symbol, invoice_id: u64, actor: &Address, timestamp: u64). Call from every public entry point inlib.rs(create_invoice,pay,release,refund) as the first operation. Use topic(symbol_short!("monitor"), function)for easy filtering.Acceptance Criteria
monitor_eventemitted at the start of every public entry point(symbol_short!("monitor"), function_name)cargo clippypasses with zero warnings