You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remittance_split, savings_goals, and bill_payments all gate their state-mutating entrypoints behind a pause flag (is_paused, pause, unpause, and in some cases per-function pause). The insurance contract in insurance/src/lib.rs has no pause mechanism at all — its DataKey enum has no Paused/PauseAdmin variants and none of its mutators check a kill switch.
Why this matters: When the emergency_killswitch is triggered during an incident, insurance is a hole in the perimeter: premiums and policy creation keep flowing while every other contract is frozen. A consistent pause guard is a baseline security control for a financial contract.
🎯 Requirements & Context
Functional requirements
Add Paused, PauseAdmin, and UpgradeAdmin to DataKey, plus set_pause_admin, pause, unpause, is_paused, set_upgrade_admin, get_upgrade_admin_public, and get_version/set_version entrypoints, matching the signatures used in savings_goals.
Insert a paused check at the top of create_policy, pay_premium, batch_pay_premiums, set_external_ref, and deactivate_policy; read-only getters remain callable while paused.
Use the existing ContractPaused/UnauthorizedPause naming convention (add variants to InsuranceError).
Authorize pause/admin operations against a configurable pause admin set at init.
Context & constraints
Soroban SDK 21.7.7, #![no_std]. Pause state lives in INSTANCE storage; bump TTL on mutation.
Keep behavior identical to the savings_goals pause module so it is reviewable by analogy.
🛠️ Suggested Execution
1. Fork & branch
git checkout -b feat/insurance-pause-guard
2. Implement changes
Add a private require_not_paused helper called by each mutator.
Edge cases: pause then unpause then mutate; non-admin attempting pause; pause admin rotation.
Example commit message
feat(insurance): add pause guard to state-mutating entrypoints
Adds pause/unpause/admin controls and gates create_policy,
pay_premium and deactivate_policy, aligning insurance with the
workspace kill-switch posture.
✅ Acceptance Criteria & Guidelines
Requirement
Target
All mutators gated by pause check
Required
Read-only getters unaffected by pause
Required
Pause-path test coverage
≥ 95%
cargo test -p insurance + clippy clean
Required
Timeframe
96 hours from assignment
💬 Community & Support
Questions and help getting set up — join the Remitwise contributor community on Discord: https://discord.gg/CtQuPZFMA
Please comment when you pick this up so we avoid duplicate work. 🚀
📋 Description
remittance_split,savings_goals, andbill_paymentsall gate their state-mutating entrypoints behind a pause flag (is_paused,pause,unpause, and in some cases per-function pause). Theinsurancecontract ininsurance/src/lib.rshas no pause mechanism at all — itsDataKeyenum has noPaused/PauseAdminvariants and none of its mutators check a kill switch.🎯 Requirements & Context
Functional requirements
Paused,PauseAdmin, andUpgradeAdmintoDataKey, plusset_pause_admin,pause,unpause,is_paused,set_upgrade_admin,get_upgrade_admin_public, andget_version/set_versionentrypoints, matching the signatures used insavings_goals.create_policy,pay_premium,batch_pay_premiums,set_external_ref, anddeactivate_policy; read-only getters remain callable while paused.ContractPaused/UnauthorizedPausenaming convention (add variants toInsuranceError).init.Context & constraints
#![no_std]. Pause state lives inINSTANCEstorage; bump TTL on mutation.savings_goalspause module so it is reviewable by analogy.🛠️ Suggested Execution
1. Fork & branch
2. Implement changes
require_not_pausedhelper called by each mutator.3. Test & commit
cargo test -p insurance -- --nocaptureExample commit message
✅ Acceptance Criteria & Guidelines
cargo test -p insurance+ clippy clean💬 Community & Support
Questions and help getting set up — join the Remitwise contributor community on Discord: https://discord.gg/CtQuPZFMA
Please comment when you pick this up so we avoid duplicate work. 🚀