CBDE BTA Certified Blockchain Developer - Ethereum Question and Answers
Question # 4
Finish the sentence: The Library Web3.js is …:
A.
useful when developing distributed applications with HTML and JavaScript, because it already implements the abstraction of the JSON-RPC interface of Ethereum Nodes.
B.
necessary when developing distributed applications with HTML and JavaScript, because the proprietary JSON-RPC interface of Ethereum Nodes is a closed source.
you should capitalize function names, events and contract names, to avoid confusion with JavaScript. You should use Tabs to indentation and a maximum of 80 characters per line.
B.
contract names should be capitalized, while functions should be mixedCase. You should use 4 spaces as indentation and a maximum of 79 (or 99) characters per line.
C.
contract should be mixedCase, as well as function names. Events should be capitalized. 2 spaces should be used as indentation and a maximum of 120 characters per line.
When solidity is compiled then also Metadata is generated:
A.
the Metadata contains the ABI Array, which defines the Interface to interact with the Smart Contract. Metadata can also contain the address of the smart contract when it gets deployed.
B.
metadata contains the address, and the size of the smart contract. The ABI Array is generated externally upon deploying the smart contract.
C.
the ABI array and the Metadata are not generated when solidity is compiled to bytecode, its generated by a migration software which deploys the smart contract on the blockchain.
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.