Problem
A single shipment typically has multiple associated documents (Bill of Lading, Proof of Delivery, customs declaration, insurance certificate). Registering each document separately on-chain requires a separate transaction per document, multiplying the cost and latency of post-delivery document submission.
Proposed Solution
Create a bulk document registration function in a new contract inside contracts/package/document-bulk/ that registers multiple documents in a single atomic 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
A single shipment typically has multiple associated documents (Bill of Lading, Proof of Delivery, customs declaration, insurance certificate). Registering each document separately on-chain requires a separate transaction per document, multiplying the cost and latency of post-delivery document submission.
Proposed Solution
Create a bulk document registration function in a new contract inside
contracts/package/document-bulk/that registers multiple documents in a single atomic transaction.Acceptance Criteria
register_documents_batch(docs: Vec<DocumentEntry>)whereDocumentEntry = { hash: BytesN<32>, doc_type: Symbol, ipfs_cid: String, expires_at: Option<u64> }BatchLimitExceededHashAlreadyRegisteredVec<BytesN<32>>— the list of document IDs created