Search for a command to run...
Product life cycle management (PLM) in large supply chains still suffers from limited transparency, manual record-keeping, and weak traceability of provenance and expiry, which often results in counterfeit products, delayed recalls, and unsafe items reaching consumers. After the advancements in blockchain technologies, immutable, decentralised and auto-generated smart contracts provide a secure, safe, and organised solution for consent to the agreement between two or more parties and help digital assets and transactions to occur efficiently This work proposes a Blockchain–Internet of Things (B-IoT) based smart-contract framework that automates three key phases of the product life cycle: purchase order creation, invoice generation at delivery, and expiry-driven discard management. The proposed system will auto-trigger the smart contract through a program. It will generate the smart contract for a product when the purchase order is placed, generate an invoice, and handle the expired and discarded products. IoT devices will record important parameters such as product ID scanning, recording storage temperature, GPS trackers during transportation, etc. These parameters will help to auto-trigger the smart contract. To tune threshold parameters (e.g., temperature bounds, delay limits) and minimize cost–latency trade-offs, we build a lightweight regression model whose hyper-parameters are optimized using nature-inspired Mayfly (MFA) and Honey Badger (HBA) algorithms. The model predicts gas usage and latency per phase, achieving an RMSE of 0.15 and R2 ≈ 0.9 on simulated transaction logs, while the final configuration yields an average execution efficiency of 92.3% and accuracy of 94.9% in correctly auto-triggering contract phases. The prototype is implemented using Ganache Truffle Suite, Remix, and MyEtherWallet, and evaluated in terms of gas consumption, functional correctness, and automation benefits over traditional manual contracts. Results demonstrate that the proposed B-IoT smart-contract framework provides transparent, tamper-resistant, and fine-grained product life management suitable for industrial deployments. B-IoT smart contracts automate PLM via event-driven purchase, invoicing, and expiry handling with tamper-proof blockchain logs. Secure oracle-driven IoT integration validates sensor data to auto-trigger contracts, ensuring transparency, traceability, and safety. Optimized performance with MFA–HBA tuning achieves approx. 95% accuracy, approx. 92% efficiency, and low gas-latency trade-offs.