← All CBDH Flashcard Decks

CBDH Smart Contract Development Flashcards

6 cards from real CBDH practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 CBDH Smart Contract Development flashcards as text
  1. In Hyperledger Fabric, what language is primarily used to write chaincode (smart contracts)?

    Answer: Go

    Hyperledger Fabric supports chaincode written in Go, JavaScript (Node.js), and Java, with Go being the most commonly used language.

  2. Which interface must a Fabric chaincode implement to be valid?

    Answer: Chaincode

    All Hyperledger Fabric chaincode must implement the Chaincode interface, which requires Init and Invoke methods.

  3. What does the `stub.PutState(key, value)` function do in Fabric chaincode?

    Answer: Writes or updates a key-value pair on the ledger

    PutState writes or updates a key-value pair in the world state ledger during chaincode execution.

  4. Which chaincode function is invoked when the chaincode is first instantiated or upgraded?

    Answer: Init()

    The Init() function is called during chaincode instantiation or upgrade, allowing initialization of ledger state.

  5. What is the purpose of `stub.GetState(key)` in Hyperledger Fabric chaincode?

    Answer: Retrieves the value associated with a key from the world state

    GetState retrieves the byte-array value associated with the specified key from the channel's world state.

  6. In Fabric chaincode, what does `stub.GetTxID()` return?

    Answer: The unique transaction ID of the current invocation

    GetTxID returns the transaction ID that uniquely identifies the current transaction proposal being processed.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. blockchaintrainingalliance.com — Test delivery, passing score, score release, test dates, fees, exam format, time limit · verified Oct 2026