DIDLab NFTs

Issue verifiable credentials and access passes with DIDLabBadges.

The DIDLab ERC-1155 stack supports soulbound badges, transferable passes, and encrypted IPFS assets—ready for classrooms and regulated pilots alike.

Chain ID 252501Contract 0xF576C253…IPFS upload desk ↗

Credential toolkit

  • Define badge IDs, cohorts, and supply caps in badges.config.json.
  • Encrypt metadata and artwork via the DIDLab IPFS desk.
  • Use Hardhat scripts to configure, airdrop, or sign permits.
  • Share CID verification steps with recipients and partners.

Badge contract: 0xF576C25355981AB143595FE0Bc224d6E46acC54f

Step 1

Define your credential matrix

Map badge IDs to cohorts, supply caps, and soulbound rules.

Catalogue every credential you plan to issue—course completions, cohort badges, access passes—and assign each an ID, supply cap, distribution window, and whether it should be soulbound.

Document the matrix in badges.config.json so deployment scripts stay aligned with your syllabus or pilot requirements.

Step 2

Prepare IPFS metadata

Encrypt artwork and JSON via the DIDLab IPFS desk.

Use the IPFS upload desk to encrypt artwork, proofs, and metadata. Save the JSON bundle—it contains the CID, IV, timestamp, and payment proof.

Sample metadata:

{
  "name": "DIDLab Credential — Blockchain Studio",
  "description": "Awarded for delivering the L2 project with full documentation.",
  "image": "ipfs://CID_FROM_UPLOAD",
  "external_url": "https://blockchain.didlab.org/projects/l2-studio",
  "attributes": [
    { "trait_type": "type", "value": "badge" },
    { "trait_type": "cohort", "value": "2025-fall" },
    { "trait_type": "issuer_did", "value": "did:example:didlab-ga" },
    { "trait_type": "version", "value": 1 },
    { "trait_type": "revocable", "value": "true" }
  ]
}

Step 3

Explore a sample badge (ID 101)

Call read functions and import the credential into a wallet.

Start with badge ID 101 (feel free to change the ID for your own cohorts). After you airdrop yourself a copy, use these commands to inspect the credential:

# Replace YOUR_WALLET with the student or instructor address
cast call 0xF576C25355981AB143595FE0Bc224d6E46acC54f "balanceOf(address,uint256)" YOUR_WALLET 101 --rpc-url https://eth.didlab.org

# Fetch the token URI (resolves to your encrypted IPFS JSON)
cast call 0xF576C25355981AB143595FE0Bc224d6E46acC54f "uri(uint256)" 101 --rpc-url https://eth.didlab.org

MetaMask supports ERC-1155 tokens. In the wallet, open Tokens → NFTs → Import NFT, paste 0xF576C25355981AB143595FE0Bc224d6E46acC54f as the contract address, and enter 101 for the Token ID. The badge will appear under the NFT tab with the name supplied in your metadata.

Encourage students to verify the badge by opening the returned IPFS URI in the gateway or by running ipfs dag get <CID> from the CLI. This reinforces how on-chain state and decentralized storage align.

Step 4

Configure DIDLabBadges

Sync badge settings on-chain with the Hardhat scripts.

Update badges.config.json with metadata URIs, supply caps, pricing, and soulbound flags for each ID.

Run npx hardhat run scripts/configure_badges.js --network didlab to push the configuration on-chain.

Badge contract: 0xF576C25355981AB143595FE0Bc224d6E46acC54f

Step 5

Issue credentials or permits

Airdrop badges or sign EIP-712 permits for self-mints.

For instructor-led issuance, run scripts/airdrop_badges.js to distribute credentials. For self-service claims, sign a permit with scripts/sign_badge_permit.js after verifying the learner, then expose it in your portal.

Restrict minting with ISSUER_ROLE and PERMIT_SIGNER_ROLE to maintain provenance.

Step 6

Verify and showcase

Publish CID hashes, educate recipients, and display badges.

Emit events with keccak256(bytes(cid)) or store URIs directly so verifiers can audit metadata independently.

Surface badges in the student gallery, LMS, or enterprise dashboard by querying balanceOf(address, id).

Document how recipients validate credentials via the DIDLab gateway or IPFS CLI to close the trust loop.