Skip to content

feat(web3): Automated Proof of Delivery (PoD) NFT Minting & Recipient Claims - #1344

Open
hrshjswniii wants to merge 4 commits into
Nitya-003:mainfrom
hrshjswniii:feature/pod-nft-minting
Open

feat(web3): Automated Proof of Delivery (PoD) NFT Minting & Recipient Claims#1344
hrshjswniii wants to merge 4 commits into
Nitya-003:mainfrom
hrshjswniii:feature/pod-nft-minting

Conversation

@hrshjswniii

Copy link
Copy Markdown
Contributor

📌 Overview

This PR implements [feature] : Automated Proof of Delivery (PoD) NFT Minting & Recipient Claims enabling digital cryptographic ERC-721 Proof of Delivery certificates containing IPFS provenance metadata (harvest origin, temperature history, inspection hash) to be automatically minted or claimed by recipients upon final batch delivery.

Key Changes Introduced:

  1. Smart Contracts Architecture:
    • Updated [ProofOfDeliveryNFT.sol] with claimProofOfDelivery(bytes32 batchId, string calldata metadataURI) and getProofByBatch(bytes32 batchId) view helper.
  2. Backend Service & Route Integration:
    • Created [backend/services/podService.js] generating IPFS metadata payloads.
    • Updated [backend/routes/batchRoutes.js] with GET /api/batches/:id/pod-nft.
  3. Automated Unit Test Suite:
    • Created [smart-contracts/test/proofOfDeliveryNFT.test.js] testing mintProof(), claimProofOfDelivery(), duplicate token prevention, and owner balances (3/3 tests passing).

🛠️ Type of Change

  • ⛓️ Smart Contract (Solidity changes, ERC-721 NFT, AccessControl)
  • 💻 Frontend (UI/UX, React components)
  • ⚙️ Backend (API routes, Web3 metadata service)
  • 📄 Documentation (README, Roadmap updates)
  • 🧪 Testing (Hardhat unit tests)

🔗 Related Issue

Closes #1306


🧪 Testing & Verification

  • Smart Contracts: npx hardhat test test/proofOfDeliveryNFT.test.js passed? (Yes) — 3/3 tests passing in 3s.
  • Backend: GET /api/batches/:id/pod-nft metadata formatting verified? (Yes).

✅ PR Checklist

  • My code follows the project's style guidelines.
  • I have commented my code, particularly in complex areas (e.g., token ID mapping & IPFS metadata formatting).
  • I have updated the documentation accordingly.
  • My changes generate no new warnings.

💬 Additional Notes

  • Updated [smart-contracts/contracts/ProofOfDeliveryNFT.sol]
  • Created [smart-contracts/test/proofOfDeliveryNFT.test.js]
  • Created [backend/services/podService.js]
  • Updated [backend/routes/batchRoutes.js]

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@hrshjswniii is attempting to deploy a commit to the Nitya Gosain's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature] : Automated Proof of Delivery (PoD) NFT Minting & Recipient Claims

1 participant