Problem
When a shipment is completed, multiple documents (Bill of Lading, Proof of Delivery, Customs Declaration) need to be verified against their on-chain hashes simultaneously. The current document contract requires one transaction per document, making post-completion verification slow and expensive.
Proposed Solution
Create a batch verification function inside contracts/package/document-verification/ that verifies multiple submitted hashes against their registered on-chain values in a single transaction.
Note: All work must be done inside the contracts/package/ directory. Do not modify any existing contract files outside this folder.
Acceptance Criteria
Problem
When a shipment is completed, multiple documents (Bill of Lading, Proof of Delivery, Customs Declaration) need to be verified against their on-chain hashes simultaneously. The current document contract requires one transaction per document, making post-completion verification slow and expensive.
Proposed Solution
Create a batch verification function inside
contracts/package/document-verification/that verifies multiple submitted hashes against their registered on-chain values in a single transaction.Acceptance Criteria
verify_documents_batch(doc_ids: Vec<BytesN<32>>, submitted_hashes: Vec<BytesN<32>>)functionInputLengthMismatchVec<VerificationResult>whereVerificationResult = { doc_id: BytesN<32>, matches: bool, stored_hash: BytesN<32> }{ total: u32, matched: u32, mismatched: u32 }