Certified Web3 Blockchain Developer CW3BD Exam, Exams of Technology

The Certified Web3 Blockchain Developer Exam validates skills required to design, develop, and deploy decentralized applications (dApps). It covers blockchain fundamentals, smart contracts, consensus mechanisms, cryptography, wallets, token standards (ERC-20, ERC-721, ERC-1155), DeFi protocols, DAOs, and decentralized storage. Candidates are tested on Web3 development tools, security best practices, scalability challenges, interoperability, and real-world blockchain use cases.

Typology: Exams

2025/2026

Available from 01/23/2026

shilpi-jain-2
shilpi-jain-2 🇮🇳

1

(1)

25K documents

1 / 91

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Certified Web3 Blockchain Developer CW3BD
Exam
**Question 1.** Which pragma statement ensures that a Solidity contract compiles with version
0.8.10 or higher but below 0.9.0?
A) pragma solidity ^0.8.10;
B) pragma solidity >=0.8.10 <0.9.0;
C) pragma solidity =0.8.10;
D) pragma solidity >=0.8.0;
Answer: B
Explanation: The syntax `>=0.8.10 <0.9.0` restricts compilation to versions from 0.8.10 up to, but
not including, 0.9.0.
**Question 2.** In Solidity, which type is best suited for storing a boolean flag that indicates
whether a contract is paused?
A) uint256
B) bool
C) address
D) bytes32
Answer: B
Explanation: The `bool` type stores true/false values and is ideal for flags like a pause state.
**Question 3.** Which of the following statements about Solidity `struct` is FALSE?
A) Structs can contain other structs.
B) Structs can be stored in mappings.
C) Structs can be used as function return types.
D) Structs can inherit from other structs.
Answer: D
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b

Partial preview of the text

Download Certified Web3 Blockchain Developer CW3BD Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which pragma statement ensures that a Solidity contract compiles with version 0.8.10 or higher but below 0.9.0? A) pragma solidity ^0.8.10; B) pragma solidity >=0.8.10 <0.9.0; C) pragma solidity =0.8.10; D) pragma solidity >=0.8.0; Answer: B Explanation: The syntax >=0.8.10 <0.9.0 restricts compilation to versions from 0.8.10 up to, but not including, 0.9.0. Question 2. In Solidity, which type is best suited for storing a boolean flag that indicates whether a contract is paused? A) uint B) bool C) address D) bytes Answer: B Explanation: The bool type stores true/false values and is ideal for flags like a pause state. Question 3. Which of the following statements about Solidity struct is FALSE? A) Structs can contain other structs. B) Structs can be stored in mappings. C) Structs can be used as function return types. D) Structs can inherit from other structs. Answer: D

Exam

Explanation: Solidity structs do not support inheritance; only contracts and interfaces can inherit. Question 4. What is the default visibility of a state variable in Solidity if no visibility keyword is specified? A) private B) internal C) public D) external Answer: B Explanation: State variables default to internal visibility, accessible within the contract and derived contracts. Question 5. Which function modifier is commonly used to restrict a function so that only the contract owner can call it? A) onlyOwner B) onlyAdmin C) onlyCreator D) onlyAuthorized Answer: A Explanation: The OpenZeppelin onlyOwner modifier checks that msg.sender equals the stored owner address. Question 6. In a Solidity function, which global variable provides the address of the account that called the function? A) tx.origin B) block.coinbase

Exam

B) assert C) revert D) throw Answer: A Explanation: require checks conditions, reverts on failure, and returns a custom error string. Question 10. What is the primary purpose of the assert statement in Solidity 0.8.x? A) Validate user input B) Check for conditions that should never be false C) Return custom error messages D) Guard against re‑entrancy Answer: B Explanation: assert is used for internal invariants; failing an assert consumes all remaining gas and triggers a panic error. Question 11. Which Hardhat plugin enables automatic generation of TypeScript typings for contract ABIs? A) hardhat-etherscan B) hardhat-deploy C) hardhat-typechain D) hardhat-gas-reporter Answer: C Explanation: hardhat-typechain (or @typechain/hardhat) generates TypeScript typings from compiled ABIs.

Exam

Question 12. In Truffle, which file is used to define migration scripts for deploying contracts? A) truffle-config.js B) migrations/1_initial_migration.js C) contracts/Migrations.sol D) test/*.js Answer: B Explanation: Migration scripts reside in the migrations folder, with numeric prefixes to order deployment. Question 13. Which command starts a local Ethereum blockchain using Ganache CLI? A) npx hardhat node B) ganache-cli - p 8545 C) truffle develop D) npm run start:ganache Answer: B Explanation: ganache-cli - p 8545 launches a local RPC server on port 8545. Question 14. When integrating with Alchemy, which URL pattern is typically used for the Ethereum mainnet endpoint? A) https://eth-mainnet.alchemyapi.io/v2/<API_KEY> B) https://mainnet.alchemy.com/eth/<API_KEY> C) https://api.alchemy.com/ethereum/mainnet/<API_KEY> D) https://alchemy.io/eth/mainnet/<API_KEY> Answer: A

Exam

D) bank.functions.deposit(); Answer: A Explanation: With ethers.js, await bank.deposit(); sends a transaction to the external function. Question 18. What does the Checks-Effects-Interactions pattern aim to prevent? A) Integer overflow B) Front‑running C) Re‑entrancy attacks D) Gas limit exceedance Answer: C Explanation: By performing checks, then state changes (effects), and finally external calls (interactions), re‑entrancy is mitigated. Question 19. Which Solidity version introduced built‑in overflow and underflow checks for arithmetic operations? A) 0.6. B) 0.7. C) 0.8. D) 0.5. Answer: C Explanation: Starting with Solidity 0.8.0, arithmetic overflow/underflow throws automatically. Question 20. Which OpenZeppelin library provides the SafeMath functions for versions prior to Solidity 0.8? A) @openzeppelin/contracts/math/SafeMath.sol B) @openzeppelin/contracts/utils/SafeMath.sol

Exam

C) @openzeppelin/contracts/security/SafeMath.sol D) @openzeppelin/contracts/token/SafeMath.sol Answer: A Explanation: The SafeMath library resides in @openzeppelin/contracts/math/SafeMath.sol. Question 21. In a contract, which function modifier is typically used to prevent a function from being called when the contract is in a paused state? A) whenNotPaused B) notPaused C) onlyWhenActive D) pauseGuard Answer: A Explanation: OpenZeppelin’s Pausable contract provides the whenNotPaused modifier. Question 22. Which of the following patterns can cause a “gas griefing” attack? A) Unbounded for‑loop over a dynamic array B) Using require for input validation C) Storing data in bytes32 instead of string D) Emitting events after state changes Answer: A Explanation: Unbounded loops may exceed the block gas limit, causing transactions to fail and grief users. Question 23. Front‑running in Ethereum is primarily a risk when: A) Reading state variables B) Sending transactions with low gas price

Exam

B) safeBatchTransferFrom C) transferMultiple D) batchTransfer Answer: B Explanation: safeBatchTransferFrom allows moving several token IDs and amounts in one call. Question 27. Which metadata JSON field is mandatory for an ERC‑721 token according to the standard? A) image B) description C) name D) No field is mandatory; the standard only defines the tokenURI function. Answer: D Explanation: ERC‑721 does not mandate any specific JSON fields; it only requires a tokenURI that returns a URI. Question 28. What is the purpose of the IPFS hash stored in a token’s metadata? A) To verify the token’s ownership on‑chain B) To provide a decentralized link to the asset’s data C) To encrypt the token’s image D) To calculate gas fees for minting Answer: B Explanation: An IPFS CID points to off‑chain content stored in a decentralized manner. Question 29. Which Solidity function modifier would you use to restrict minting of NFTs to a whitelist address list?

Exam

A) onlyWhitelisted B) onlyApproved C) onlyMinter D) onlyOwner Answer: A Explanation: A custom onlyWhitelisted modifier checks that msg.sender is in a stored whitelist mapping. Question 30. In ERC‑2981, which function defines the royalty amount for a given token sale? A) royaltyInfo(uint256 tokenId, uint256 salePrice) B) getRoyalty(uint256 tokenId) C) royaltyAmount(uint256 tokenId) D) calculateRoyalty(uint256 tokenId, uint256 price) Answer: A Explanation: royaltyInfo returns the receiver address and royalty amount based on the sale price. Question 31. Which of the following is a core requirement of the ERC‑20 token standard? A) tokenURI function B) totalSupply() view returns (uint256) C) mint() external D) burn(uint256 amount) external Answer: B Explanation: totalSupply is one of the six mandatory ERC‑20 functions.

Exam

Explanation: LP tokens are minted to providers to represent their proportional ownership of the pool’s assets. Question 35. Which Solidity pattern is recommended for a yield farming contract that distributes rewards based on the amount of staked tokens? A) Pull‑based reward claim B) Push‑based automatic distribution on each block C) Fixed‑interval reward transfer using selfdestruct D) Reward distribution via tx.origin Answer: A Explanation: Pull‑based claims let users call a function to withdraw accrued rewards, reducing gas costs and re‑entrancy risk. Question 36. In a DAO voting contract, which data structure is typically used to record each member’s voting weight? A) mapping(address => uint256) votes; B) address[] voters; C) uint256 totalVotes; D) bytes32[] proposals; Answer: A Explanation: A mapping from member address to weight efficiently tracks voting power. Question 37. Which function modifier would you apply to a staking contract’s withdraw function to ensure the contract is not in an emergency pause state? A) whenNotPaused B) notEmergency C) activeOnly

Exam

D) withdrawable Answer: A Explanation: The whenNotPaused modifier (from Pausable) prevents withdrawals during an emergency pause. Question 38. What is the purpose of the receive() function in Solidity? A) To handle plain Ether transfers with no calldata B) To process fallback calls with data C) To accept ERC‑20 tokens D) To implement ERC‑721 safe transfers Answer: A Explanation: receive() is executed when the contract receives Ether without any calldata. Question 39. Which of the following statements about tx.origin is correct? A) It is safe to use for access control in modern contracts. B) It returns the immediate caller of the function. C) It can be exploited in phishing attacks. D) It is equivalent to msg.sender. Answer: C Explanation: tx.origin reflects the original external account, making it vulnerable to phishing when used for authentication. Question 40. Which Hardhat task is used to compile contracts? A) hardhat compile B) hardhat build C) hardhat make

Exam

D) Use uint8 for all numbers Answer: B Explanation: Solidity 0.7.x lacks native overflow checks, so SafeMath is used to protect arithmetic. Question 44. What does the selfdestruct opcode do? A) Pauses the contract indefinitely B) Transfers all Ether to a given address and removes the contract’s bytecode C) Deletes the contract’s storage but keeps the code D) Reverts the current transaction Answer: B Explanation: selfdestruct(address payable recipient) sends remaining Ether to recipient and removes the contract from the state. Question 45. Which of the following is a characteristic of a “gas‑optimized” Solidity loop? A) Using push() on storage arrays inside the loop B) Declaring loop counters as uint256 C) Minimizing external calls within the loop D) Using require statements inside the loop body Answer: C Explanation: Reducing external calls inside loops lowers gas consumption and risk of out‑of‑gas errors. Question 46. In ERC‑721, which event must be emitted when a token is transferred? A) Transfer(address indexed from, address indexed to, uint256 indexed tokenId) B) Transfer(address indexed owner, address indexed token, uint256 amount)

Exam

C) TokenTransfer(uint256 tokenId, address from, address to) D) ERC721Transfer(address from, address to, uint256 tokenId) Answer: A Explanation: The ERC‑721 standard defines the Transfer event with the specified signature. Question 47. Which function in an ERC‑1155 contract is used to check the balance of a specific token ID for an account? A) balanceOf(address account, uint256 id) B) balanceOfBatch(address[] accounts, uint256[] ids) C) getBalance(address owner, uint256 tokenId) D) tokenBalance(address, uint256) Answer: A Explanation: balanceOf returns the amount of a particular token ID held by an address. Question 48. What is the purpose of the ERC165 standard? A) To define a universal token metadata schema B) To enable contracts to declare support of interfaces C) To provide a standard for cross‑chain communication D) To enforce gas limits on function calls Answer: B Explanation: ERC165 allows contracts to signal which interfaces they implement via supportsInterface. Question 49. Which of the following is NOT a typical step in a DeFi lending protocol’s workflow? A) Collateral deposit

Exam

Question 52. Which of the following statements about delegatecall is TRUE? A) It preserves the caller’s msg.sender and msg.value. B) It changes the storage layout of the calling contract. C) It executes code in the context of the called contract. D) It cannot be used with libraries. Answer: A Explanation: delegatecall runs the code of another contract but keeps the original msg.sender and msg.value. Question 53. Which OpenZeppelin contract provides a “role‑based” access control system? A) Ownable B) AccessControl C) Pausable D) ERC20Burnable Answer: B Explanation: AccessControl allows defining multiple roles and assigning them to addresses. Question 54. In a Solidity mapping(address => uint256) balances;, what is the default value returned for an address that has never been assigned a balance? A) 0 B) null C) revert D) undefined Answer: A Explanation: Uninitialized mapping entries default to the zero value of the value type, which is 0 for uint256.

Exam

Question 55. Which of the following is a best practice for handling external contract calls to mitigate re‑entrancy? A) Use call.value() with a low gas stipend B) Update state variables before making the external call C) Place the external call before any state changes D) Rely on assert after the call Answer: B Explanation: Updating state first (effects) before external interactions follows the Checks‑Effects‑Interactions pattern. Question 56. Which event is emitted by an ERC‑20 token when an allowance is set via approve? A) Transfer B) Approval C) AllowanceSet D) Approved Answer: B Explanation: The ERC‑20 standard defines the Approval event for allowance changes. Question 57. In the context of gas optimization, which storage location is cheapest to read from? A) Memory B) Calldata C) Storage D) Stack