01. You interact with a smart contract and see a gas usage of 50,000 gas with a gas cost of 15Gwei. How much Ether would you have to pay to the miner?
a) 750,000,000,000,000 Wei
b) 750,000,000,000 Wei
c) 750,000,000 Wei
d) A flat fee of 1 Ether
02. Address.call.value():
a) sends the gas stipend of 2300 gas and returns a false on error.
b) sends all the gas along and cascades exceptions.
c) sends all the gas along and returns a false on error
d) sends the gas stipend of 2300 gas and cascades exceptions
03. The difference between address.send() and address.transfer() is:
a) send returns a Boolean and .transfer throws an exception on error. Both just forward the gasstipend of 2300 gas and are considered safe against re-entrancy.
b) send throws an exception and .transfer returns a Boolean on error. Both just forward the gasstipend of 2300 gas and considered safe against re-entrancy
c) send returns a Boolean and .transfer throws an exception on error. .send is considered dangerous, because it sends all gas along, while .transfer only sends the gas stipend of 2300 gas along
d) send and .transfer are both considered low-level functions which are dangerous, because they send all gas along. It’s better to use address.call.value()() to control the gas-amount
04. What’s the correct scientific notation?
a) 1 Ether = 10^18 wei, 10^6 Gwei, 10^6 Finney
b) 1 Ether = 10^19 wei, 10^13 Gwei, 10^3 Finney
c) 1 Ether = 10^16 wei, 10^13 Gwei, 10^3 Finney
d) 1 Ether = 10^18 wei, 10^9 Gwei, 10^3 Finney
05. All low-level functions on the address, so address.send(), address.call.valueQQ, address.callcode and address.delegatecall:
a) are interrupting execution on error, because they throw an exception
b) continuing execution on error silently, which is the reason why they are so dangerous.
c) returning Booleans to indicate an error during execution
d) send() throws an exception, while the other functions are returning Booleans during execution to indicate an error
06. Variables of the type address store:
a) a 20 bytes value
b) a 32 bytes value
c) a string
d) a 20 characters long hex number
07. If contract MyContractA is derived from Contract MyContractB, then this would be the right syntax:
a) contract MyContractA inherit (MyContractB) {…}
b) contract MyContractA is MyContractB { … }
c) contract MyContractA extends MyContractB {…}
d) contract MyContractB derives MyContractA {…}
08. To generate a random number:
a) it’s good to use the block timestamp, as this is always different.
b) it’s good to use the block hash as this is clearly always very different.
c) it’s not possible to have a random number in a deterministic environment such as the Ethereum blockchain.
d) it’s good to use the RANDAO smart contract.
09. It’s easy to write clean-room unit-tests with truffle:
a) for Java, JavaScript, and C++
b) for JavaScript using Web3.js
c) for Solidity and JavaScript
d) for any language, as long as it adheres to the open Testing-Interface from Truffle
10. The JSON-RPC Protocol:
a) is used to communicate between blockchain nodes.
b) is used to ensure safe communication between miners
c) is a mean of dumping the blockchain data in a so-called consensus export.
d) is used to communicate between the blockchain node and externally running applications.