ExamGecko
Home Home / Blockchain / CBDE

Blockchain CBDE Practice Test - Questions Answers, Page 7

Question list
Search
Search

A version pragma is a great way to make it clear:

A.
for which compiler version a smart contract was developed for. It helps to avoid breaking changes.
A.
for which compiler version a smart contract was developed for. It helps to avoid breaking changes.
Answers
B.
for which blockchain a smart contract was developed for. It helps to avoid confusion with beta-customers.
B.
for which blockchain a smart contract was developed for. It helps to avoid confusion with beta-customers.
Answers
C.
for which blockchain node a smart contract was developed for. It helps to avoid mixing up different versions of go-ethereum.
C.
for which blockchain node a smart contract was developed for. It helps to avoid mixing up different versions of go-ethereum.
Answers
Suggested answer: A

Variables of the type address store:

A.
a 20 bytes value
A.
a 20 bytes value
Answers
B.
a 32 bytes value
B.
a 32 bytes value
Answers
C.
a string
C.
a string
Answers
D.
a 20 characters long hex number
D.
a 20 characters long hex number
Answers
Suggested answer: A

Address.send():

A.
will cascade exceptions and address.transfer() will return a false on error.
A.
will cascade exceptions and address.transfer() will return a false on error.
Answers
B.
will return false on error while address.transfer() will cascade transactions.
B.
will return false on error while address.transfer() will cascade transactions.
Answers
Suggested answer: B

Address.call.value():

A.
sends the gas stipend of 2300 gas and returns a false on error.
A.
sends the gas stipend of 2300 gas and returns a false on error.
Answers
B.
sends all the gas along and cascades exceptions.
B.
sends all the gas along and cascades exceptions.
Answers
C.
sends all the gas along and returns a false on error.
C.
sends all the gas along and returns a false on error.
Answers
D.
sends the gas stipend of 2300 gas and cascades exceptions.
D.
sends the gas stipend of 2300 gas and cascades exceptions.
Answers
Suggested answer: C

Address.send() and address.transfer() are considered:

A.
safe against reentrancy because of the small gas stipend of 2300 gas.
A.
safe against reentrancy because of the small gas stipend of 2300 gas.
Answers
B.
dangerous because they send all gas along, it's better to use address.call.value()().
B.
dangerous because they send all gas along, it's better to use address.call.value()().
Answers
Suggested answer: B

When defining a new datatype:

A.
its best to use a contract with public storage variables, so it can be used like a class.
A.
its best to use a contract with public storage variables, so it can be used like a class.
Answers
B.
it's best to use a struct, which is cheaper than deploying a new contract.
B.
it's best to use a struct, which is cheaper than deploying a new contract.
Answers
C.
it's not possible to generate new datatypes in Solidity.
C.
it's not possible to generate new datatypes in Solidity.
Answers
Suggested answer: B

What's the difference between Ethereum Request for Comments (ERC) and Ethereum Improvement Proposals (EIP)?

A.
ERC are here to define standards for the usage of Ethereum. EIP are here to improve the Ethereum Protocol itself.
A.
ERC are here to define standards for the usage of Ethereum. EIP are here to improve the Ethereum Protocol itself.
Answers
B.
ERC are here to propose new distributed applications on top of the Ethereum layer, while EIP are here to improve existing mining software.
B.
ERC are here to propose new distributed applications on top of the Ethereum layer, while EIP are here to improve existing mining software.
Answers
C.
ERC are an open platform to discuss continuous forking of the Ethereum platform. Successful forks are then incorporated in the EIP for further voting by the Ethereum Consortium.
C.
ERC are an open platform to discuss continuous forking of the Ethereum platform. Successful forks are then incorporated in the EIP for further voting by the Ethereum Consortium.
Answers
Suggested answer: A

What is the difference between ERC20 and ERC721 Tokens in simple terms?

A.
The tokens of a certain ERC20 symbol are all the same, the tokens of an ERC721 symbol are all different. So, ERC20 tokens are fungible, while ERC721 tokens are non-fungible.
A.
The tokens of a certain ERC20 symbol are all the same, the tokens of an ERC721 symbol are all different. So, ERC20 tokens are fungible, while ERC721 tokens are non-fungible.
Answers
B.
The tokens of a certain ERC20 symbol are all different, the tokens of an ERC721 symbol are all the same. So, ERC20 tokens are non-fungible while ERC721 tokens are fungible.
B.
The tokens of a certain ERC20 symbol are all different, the tokens of an ERC721 symbol are all the same. So, ERC20 tokens are non-fungible while ERC721 tokens are fungible.
Answers
Suggested answer: A

In order to implement an ERC20 token contract, you'd need at least to implement the following functions and events in order to fulfill the interface requirements:

A.
totalSupply(), balanceOf(address), allowance(address,address), transfer(address,uint256), approve(address,uint256), transferFrom(address,address,uint256). Events: Transfer(address,address,uint256), Approval(address,address,uint256)
A.
totalSupply(), balanceOf(address), allowance(address,address), transfer(address,uint256), approve(address,uint256), transferFrom(address,address,uint256). Events: Transfer(address,address,uint256), Approval(address,address,uint256)
Answers
B.
name(), symbol(), totalSupply(), balanceOf(address), ownerOf(uint26),approve(address,uint256), takeOwnership(uint256),transfer(address,uint256),Events: Transfer(address,address,uint256), Approval(address,address,uint256)
B.
name(), symbol(), totalSupply(), balanceOf(address), ownerOf(uint26),approve(address,uint256), takeOwnership(uint256),transfer(address,uint256),Events: Transfer(address,address,uint256), Approval(address,address,uint256)
Answers
Suggested answer: A

Why is it important to follow the same Interfaces?

A.
Websites that try to interface with the Token would have to know the exact ABI. It is upfront clear how the interaction has to be with the standard Interfaces.
A.
Websites that try to interface with the Token would have to know the exact ABI. It is upfront clear how the interaction has to be with the standard Interfaces.
Answers
B.
The Ethereum Foundation can easily validate the Tokens and approve any audits by following the standard interface.
B.
The Ethereum Foundation can easily validate the Tokens and approve any audits by following the standard interface.
Answers
Suggested answer: A
Total 102 questions
Go to page: of 11