Problem
Whether a shipment is insured is tracked only in the PostgreSQL database. The Soroban blockchain has no record of insurance status, so on-chain escrow dispute and refund decisions cannot reference insurance — the two systems are completely decoupled with no shared truth.
Proposed Solution
Add insurance metadata to a new shipment contract inside contracts/package/shipment-insurance/ so that insurance status is provably recorded on-chain and accessible to other contracts.
Note: All work must be done inside the contracts/package/ directory. Do not modify any existing contract files outside this folder.
Acceptance Criteria
Problem
Whether a shipment is insured is tracked only in the PostgreSQL database. The Soroban blockchain has no record of insurance status, so on-chain escrow dispute and refund decisions cannot reference insurance — the two systems are completely decoupled with no shared truth.
Proposed Solution
Add insurance metadata to a new shipment contract inside
contracts/package/shipment-insurance/so that insurance status is provably recorded on-chain and accessible to other contracts.Acceptance Criteria
create_shipmentacceptsis_insured: bool,insurance_premium: i128, andinsurance_policy_id: Stringget_insurance_status(shipment_id)returns{ is_insured, premium, policy_id }InsuranceClaimevent with the policy IDis_insured: falseand zero values for premium and policy IDinsurance_policy_idmaximum length is 64 characters; longer values returnPolicyIdTooLongerror