A10: Blockchain Identity Lab★★☆ Medium

Assignment Type: Practical Lab (Take-Home or In-Class)
Time Allocation: 90 minutes
Points: 50 (40 core + 10 bonus)
Group Size: Individual

Learning Objectives

By completing this lab, you will:

  • Understand how arbitrary data is stored on a public blockchain
  • Use MetaMask to send transactions with custom data payloads
  • Experience content-addressed storage via IPFS
  • Verify on-chain data using a block explorer (Etherscan)
  • (Bonus) Understand NFT minting as a mechanism for on-chain media references

Learning Prerequisites

Before starting this lab, review the following lecture material:

These slides cover the W3C DID standard, verifiable credentials, and soulbound tokens that form the theoretical foundation for this hands-on lab.

Technical Prerequisites

Important: This lab uses the Sepolia TESTNET. No real money is involved. Testnet ETH has zero monetary value. All transactions are public and permanent on the testnet.

Phase 1: Wallet Setup & Testnet ETH (15 minutes)

1Install MetaMask

2Add Sepolia Testnet

  • Click the network dropdown in MetaMask (top-left)
  • Toggle "Show test networks" ON (Settings > Advanced)
  • Select "Sepolia test network"

3Get Free Testnet ETH

Visit any of the following faucets to request free Sepolia ETH:

Paste your MetaMask wallet address into the faucet, request ETH, and wait 30–60 seconds. Confirm the balance appears in MetaMask.

Deliverable: Screenshot of MetaMask showing your Sepolia ETH balance.

Phase 2: Add Your Name to the Blockchain (20 minutes)

1Enable Hex Data in MetaMask

  • Open MetaMask > Settings (gear icon) > Advanced
  • Toggle ON "Show hex data"

Note: In MetaMask v11 and later, the "Show hex data" toggle may have been moved or renamed. If you do not see it under Settings > Advanced, look for a "Hex" tab directly in the Send transaction screen, or consult the MetaMask documentation for your version.

2Convert Your Name to Hex

3Send the Transaction

  • In MetaMask, click "Send"
  • Recipient: your own wallet address (send to yourself)
  • Amount: 0 ETH
  • Paste the hex string into the "Hex Data" field
  • Click "Next", review the gas fee (~0.0001 ETH on testnet)
  • Click "Confirm"

4Verify on Etherscan

  • Click the transaction in MetaMask > "View on block explorer"
  • Or go to https://sepolia.etherscan.io/ and search for your address
  • Find your transaction and click on it
  • Scroll to "Input Data"
  • Click "View Input As" > "UTF-8"
  • Your name should appear in plaintext!
Deliverable: Etherscan link showing your name in the transaction input data.

Phase 3: Add Your Picture to the Blockchain (30 minutes)

1Upload Image to IPFS via Pinata

  • Go to https://app.pinata.cloud/ and create a free account
  • Click "Add Files" > "File"
  • Upload your photo (selfie, portrait, any image under 5 MB)
  • Wait for the upload to complete
  • Copy the CID (Content Identifier) — it looks like QmX... or bafy...

2Find Your Dedicated Gateway URL

  • In your Pinata dashboard, go to "Gateways"
  • Note your account-specific gateway URL (format: your-gateway.mypinata.cloud)
  • Test your image: https://your-gateway.mypinata.cloud/ipfs/YOUR_CID
Important: The old public gateway (gateway.pinata.cloud) no longer works for new accounts. You must use your own dedicated gateway URL.

Understanding What Just Happened

  • IPFS = InterPlanetary File System (decentralized storage)
  • CID = cryptographic hash of the file content (content-addressed)
  • The same file always produces the same CID (deterministic)
  • Anyone with the CID can retrieve the file from IPFS
  • The image is not on the blockchain yet — only on IPFS

3Store the IPFS CID on the Blockchain

  • Convert the CID to hex using the same tool as Phase 2
  • Optionally prepend a label before converting: IPFS_CID:QmX...
  • Send another 0 ETH transaction to yourself with the hex CID in the data field
  • Confirm on Etherscan: the CID is now permanently on-chain

4Verify the Link

  • Take the CID from Etherscan (Input Data > UTF-8)
  • View the image via your Pinata gateway: https://your-gateway.mypinata.cloud/ipfs/YOUR_CID
  • The blockchain transaction proves you uploaded this specific image at this specific time
Deliverables:
  • Pinata dashboard screenshot showing the uploaded image with its CID
  • Etherscan link showing the CID in the transaction input data
  • Working IPFS gateway link to your image (using your dedicated gateway)

Phase 4 (Bonus): Mint Your Photo as an NFT (25 minutes)

1Go to thirdweb Dashboard

2Deploy an NFT Contract

  • Click "Deploy" > browse contracts > "NFT Collection" (ERC-721)
  • Name: YourName Identity NFT
  • Symbol: IDNFT
  • Network: Sepolia
  • Click "Deploy Now"
  • Confirm the transaction(s) in MetaMask

3Mint Your NFT

  • Go to the "NFTs" tab in your deployed contract
  • Click "+ Mint"
  • Name: My Blockchain Identity - YourName
  • Description: My photo permanently linked to the blockchain
  • Image: upload your photo
  • Click "Mint NFT"
  • Confirm in MetaMask

4View Your NFT

  • Copy the contract address from thirdweb
  • Go to https://testnets.opensea.io/
  • Search for your contract address or connect your wallet
  • Your NFT should appear with your photo
Deliverables:
  • thirdweb dashboard screenshot showing your minted NFT
  • OpenSea testnet link showing your NFT

Reflection Questions

  1. Your name is now permanently on a public blockchain. What are the privacy implications? How does this differ from posting on social media?
  2. Why did we store the image CID on-chain instead of the image itself? What would happen if we tried to store a 5 MB image directly on Ethereum?
  3. The IPFS CID is a hash of your image. If you modified one pixel, would the CID change? Why?
  4. How does this lab demonstrate the concept of "immutability" in blockchain?
  5. (Bonus) If Pinata goes offline, can your image still be retrieved from IPFS? What about from the blockchain?

Submission Checklist

Item Points Submitted?
Phase 1: MetaMask setup + Sepolia ETH screenshot 5
Phase 2: Name transaction Etherscan link 12
Phase 3: IPFS CID + on-chain hash Etherscan link 15
Phase 3: Working IPFS gateway link 5
Phase 4 (Bonus): NFT on OpenSea testnet 10
Reflection questions (5 answers) 3
Total 40 core + 10 bonus = 50 max

Cryptoeconomics Course | A10: Blockchain Identity Lab | Page 1 of 1

Related Resources

Rubric Answer Key Instructor Guide

Assignment Resources

© Joerg Osterrieder 2025-2026. All rights reserved.