




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































BASICS (40 Questions) Question 1 Solidity is best described as which type of programming language?
contracts/accounts. The order of restrictiveness (most to least) is private → internal → external → public. Question 6 What is the difference between view and pure functions in Solidity?
authorization is a security vulnerability because a malicious contract can spoof it. Question 9 What is the purpose of the payable keyword in Solidity?
Explanation: The receive() function is a special function executed when a contract receives plain Ether without any calldata. It must have external visibility and can be marked payable. If a contract receives Ether without receive() or a payable fallback(), the transaction reverts. Question 14 What is the correct way to handle errors in Solidity when making low- level calls?
Which keyword is used to define a constructor in Solidity?
contract. call executes code in the context of the called contract. delegatecall is used in proxy patterns for upgradeability. Question 20 What is the maximum number of topics (indexed parameters) an event can have?
Question 23 What does the fallback() function do in Solidity?
What does the address type's .balance member return?
Explanation: abi.encodePacked() performs tight packing of arguments without padding, producing a bytes array. It is commonly used for creating hashes with keccak256(). However, it should be used with caution as it can lead to hash collisions if used for signatures. Question 29 Which of the following is a correct statement about selfdestruct in Solidity?