ExamDumpster

Free CBDE sample questions

Practise with these free CBDE sample questions, each with the answer and an explanation. They cover Solidity code, gas fees and contract security. Note which security questions you miss, since that area carries real risk in practice.

Try them in the simulator Same questions, with study, timed and flashcard modes.

Showing 10 of 20 free sample questions.

Question 1Choose one

What is the primary purpose of the `abi.encodePacked()` function in Solidity, and how does it differ from `abi.encode()`?

Question 2Choose one

A developer is creating an upgradeable smart contract using the UUPS (Universal Upgradeable Proxy Standard) pattern. Where must the upgrade logic, such as the `authorizeUpgrade` function, be implemented?

Question 3Choose one

When unit testing a smart contract with Hardhat, which helper library is commonly used for making assertions about blockchain-specific data, such as reverted transactions, emitted events, and changes in Ether balance?

Question 4Choose one

A developer needs to store a small, fixed-size string (e.g., a 4-character ticker symbol) in a smart contract. To optimize for gas costs, which data type is the most suitable choice in modern Solidity (0.8.x)?

Question 5Choose 2

The EIP-1559 update fundamentally changed Ethereum's transaction fee market. Which of the following are direct consequences of this update for users and developers? (Select TWO)

Question 6Choose one

True or False: A smart contract can prevent a specific Externally Owned Account (EOA) from ever interacting with it by adding the EOA's address to a blacklist mapping and checking it with a `require` statement in every public and external function.

Question 7Choose one

In Solidity, what is the primary security risk associated with using `tx.origin` for authorization checks in a smart contract?

Question 8Choose one

A developer is writing a function to transfer ownership of an ERC721 token. The function must ensure that the recipient is capable of receiving NFTs to prevent tokens from being locked forever. Which standard should the recipient contract implement to signal this capability?

Question 9Choose one

What is the role of a 'Provider' in a Web3 library like Web3.js or Ethers.js?

Question 10Choose one

The diagram below shows the UUPS proxy pattern. Based on this pattern, which statement is correct? graph TD User -->|Transaction| Proxy subgraph Contract Logic Proxy -->|delegatecall| Implementation_V1 Implementation_V1 -- contains --> UpgradeLogic[upgradeTo(...)] end Implementation_V1 |storage| ProxyState[Proxy Contract State] subgraph Upgrade Process Admin -->|Calls upgradeTo| Implementation_V1 Implementation_V1 -->|Updates Proxy| Proxy Proxy -->|delegatecall| Implementation_V2 end

10 more free samples are waiting

Create a free account to unlock the whole CBDE sample bank, or get full access to all 212 practice questions in the simulator.

Create account