Creating Test Ledger Entries for PoC
Categories:
4 minute read
Creating Test Ledger Entries for Proof-of-Concept
This guide explains how to create placeholder records on the Sepolia Ethereum testnet. These records simulate real blockchain entries for linking quotes in Proof-of-Concept (PoC) documents, like the Verifiable Quotes PoC page. This allows demonstrating the linking mechanism without deploying a full smart contract using a standard Ethereum testnet.
Prerequisites
- MetaMask: Install the MetaMask browser extension.
- Note on Multiple Wallets: If you have multiple browser wallet extensions installed (e.g., MetaMask and Coinbase Wallet), they might conflict. You may need to temporarily disable other wallet extensions via your browser’s extension settings for the desired wallet (MetaMask) to connect correctly to websites like Chainlist or faucet sites.
Steps
1. Set up MetaMask for Sepolia Testnet
You need to add the Sepolia test network to your MetaMask wallet. Sepolia is the recommended Ethereum testnet for application development.
- Go to Chainlist.org. Ensure “Include Testnets” is checked. Look specifically for the official Sepolia testnet which has ChainID
11155111. Be careful not to select other networks that contain “Sepolia” in their name (like zkSync Sepolia, etc.). Connect your wallet to add it automatically. - Alternatively, add it manually in MetaMask settings:
- Network Name: Sepolia Testnet
- New RPC URL:
https://rpc.sepolia.org(This is a reliable public endpoint. You can also find others via services like Infura, Alchemy, etc., which may offer higher rate limits if needed for extensive testing, often requiring free sign-up.) - Chain ID:
11155111(This is the key identifier!) - Currency Symbol:
SepoliaETH - Block Explorer URL:
https://sepolia.etherscan.io/
- Ensure Sepolia Testnet is selected as your active network in MetaMask.
2. Get Testnet ETH (SepoliaETH)
Transactions require gas fees, even on testnets. You can get free SepoliaETH from a faucet. Note that some faucets may require you to hold a small amount of mainnet ETH in your wallet or sign up for an account.
- Copy your MetaMask wallet address.
- Visit a Sepolia faucet:
- sepoliafaucet.com
- faucet.quicknode.com/ethereum/sepolia
- infura.io/faucet/sepolia
- (Search for other “Sepolia ETH faucet”)
- Paste your address and follow the instructions to request test ETH. A small amount (e.g., 0.1 SepoliaETH) is sufficient for many test transactions.
3. Prepare Data for a Quote
For each quote you want to link in your PoC, gather its essential metadata.
- Example Data:
quote: “This is the first source document…” (The actual text)cid:QmP5zJFaRTCmoQcjKgynj9Apu31nmXHQ23SXZXiB4FQwQY(IPFS CID of the source)source: “Source Email 1” (Description of the source)
- Generate Quote Hash: Calculate a unique identifier for the quote text itself, preferably using SHA-256. You can use online tools or programming libraries for this.
- Example SHA-256 Hash:
0xabc123...def
- Example SHA-256 Hash:
- Combine Data: Create a simple string containing the key information.
- Example String:
QuoteHash:0xabc123...def, CID:QmP5zJFaRTCmoQcjKgynj9Apu31nmXHQ23SXZXiB4FQwQY, Source:Source Email 1
- Example String:
4. Convert Data to Hexadecimal
Blockchain transaction data is often sent in hexadecimal format.
- Take the combined data string from Step 3.
- Use an online tool (e.g., search “text to hex converter”) or programming tools to convert the string to its hexadecimal representation.
- Ensure the output starts with
0x. If not, prepend it manually.- Example Hex Data:
0x51756f7465486173683a3078616263...
- Example Hex Data:
5. Send the Testnet Transaction
Now, embed the hex data into a transaction on the Sepolia testnet.
- Open MetaMask (ensure Sepolia Testnet network is selected).
- Click Send.
- Recipient: Enter your own MetaMask address or the zero address (
0x0000000000000000000000000000000000000000). - Amount: Enter
0SepoliaETH. - Hex Data / Input Data: Find the field for transaction data (you might need to enable advanced gas settings). Paste the hex-encoded data string (including
0x) from Step 4 into this field. - Click Next, review the gas fee (it should be very small), and Confirm the transaction.
6. Get the Transaction Hash (TxID)
Once the transaction is confirmed, you need its unique identifier.
- Go to the Activity tab in MetaMask.
- Click on the confirmed transaction you just sent.
- Click View on block explorer (or similar link).
- This opens the transaction details on
sepolia.etherscan.io. - Copy the Transaction Hash (e.g.,
0x1234abcd...). This is thetxvalue you’ll use in your PoC document.
7. Repeat for Other Quotes
Repeat Steps 3 through 6 for every quote you need to create a placeholder record for in your PoC. Each quote should have its own unique transaction hash.
8. Update Your PoC Document
- Open the Markdown file containing your PoC quotes (e.g.,
content/blog/verifiable-quotes-poc.md). - Find the shortcodes or links representing your quotes.
- Replace the placeholder
txvalues or link destinations with the actual Transaction Hashes you obtained from Sepolia Etherscan in Step 6.
Now your PoC document will link to real transactions on the Sepolia testnet, effectively simulating links to on-chain verification records.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.