Blockchain CBDE Practice Test - Questions Answers, Page 9
List of questions
Related questions
If you need more fine-grained functionality than solidity offers out of the box:
A.
you can incorporate inline-assembly to get better controls.
B.
you have to import pre-compiled assembly files which are then hard-copied into the bytecode of the compiled solidity file.
C.
you can use Viper, the experimental assembly like language specifically to offer more flexibility.
Address.Call vs. Address.Delegatecall:
A.
Address.call() is used for calling other contracts using the scope of the called contract in terms of storage variables. Address.delegatecall() is used for libraries, which uses the storage variables of the contract who called. Libraries are agreat way to re-use already existing code and delegatecall can make sure that no storage is used from the library, instead it looks like the code is directly copied into the calling contract.
B.
Address.delegatecall() is used for calling other contracts using the scope of the called contract in terms of storage variables. Address.call() is used for libraries, which uses the storage variables of the contract who called. Libraries are agreat way to re-use already existing code and call() can make sure that no storage is used from the library, instead it looks like the code is directly copied into the calling contract.
It's not possible to use inheritance from multiple sources in Solidity.
A.
True
B.
False
Assert is used:
A.
to check internal states that should never happen.
B.
to check input arguments from users.
.Require is used:
A.
to check internal states that should never happen.
B.
to check input arguments from users.
Truffle:
A.
is a framework that helps developers with Testing, Deployment and Management of Smart Contracts and Distributed Applications.
B.
is a library that helps developers to connect to Ethereum nodes, because it abstracts the JSONRPC interface.
C.
is a framework for Java, similar to Web3.js for JavaScript. It's a great way to develop distributed Java enterprise applications.
Unit-Testing on a local chain is important, because it helps you:
A.
to run tests quickly and especially for free, compared to continuous deployment on the MainNetwork. This way you save a lot of fees, time and costs.
B.
to run tests in an environment where logging is activated. On the Main-Net you have no access to transaction logs and this is ultimately the information you need to debug your contracts.
C.
to avoid regression bugs with contracts that are updated constantly on the main-net. Once you update a contract on the main-net, the address stays the same, but the code changes and this can have disastrous side-effects.
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
With the truffle config file you can manage:
A.
the amount of gas your contract deployment and transactions, against your contract, will need. This way you can essentially lower the gas costs over traditional web3.js dApps.
B.
different Networks to deploy your contracts to. This way you can easily deploy to a local blockchain, the main-net or the Ropsten/Rinkeby Test-Net with only one parameter.
C.
you can manage your secret API keys to the Ethereum Network. This way you can get access to several different Ethereum nodes at the same time without the need to switch your keyfiles.
Truffle boxes are a great way:
A.
to contribute to the box community which is the distributed file system for truffle.
B.
to start with a pre-configured environment for most web-development needs.
C.
to use tools that makes boxing of Dapps for different platforms very easy.
Question