Problem
Several assetsup functions iterate over collections by calling individual env.storage().get() inside loops. Each storage read is a separate ledger entry access. For large datasets this pattern is inefficient and increases transaction fees.
Proposed Solution
Create contracts/opsce/src/storage_optimization.rs. Refactor identified hot-path functions to batch reads using a single Vec-backed storage key where possible.
Acceptance Criteria
Problem
Several
assetsupfunctions iterate over collections by calling individualenv.storage().get()inside loops. Each storage read is a separate ledger entry access. For large datasets this pattern is inefficient and increases transaction fees.Proposed Solution
Create
contracts/opsce/src/storage_optimization.rs. Refactor identified hot-path functions to batch reads using a singleVec-backed storage key where possible.Acceptance Criteria
assetsup/src/that iterate with per-item storage readsbatch_getstorage pattern using a singleVecstorage entry for collections of up to 50 itemscargo testpasses after the change