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 a great 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 a great 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.
Keccack256 while internally to hash values it's easy to use the Dagger-Hashimoto to create a meaningful hash.
B.
the Dagger-Hashimoto hashing while internally the EVM uses SHA256 which is an alias for Keccack256.
C.
the Dagger-Hashimoto hashing while internally the EVM uses Keccack256 which is almost similar to SHA256, but has a different padding so produces different hashes.
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.
a list of transactions as well as uncles is incorporated in the block. All gas that is used during those transactions is added to the miners' balance. Also, the block reward is added to the miner. Then the same transactions are run again by every participating node in the network to achieve consensus.
B.
a list of transactions is incorporated in that block. Gas used during the execution is attached to the executing contracts while the block reward is automatically spread across the mining pool to ensure a fair spread. Consensus is reached by a special form of hash code.
are always living on the same address, because the blockchain is deterministic. So, one account can always have one smart contract.
B.
are having the same address as the EOA.
C.
are sitting on their own address. The Address is created from the nonce and the EOA address and could be known in advance before deploying the smart contract.
D.
the address of the smart contract is a random address which gets generated by the miner who mines the contract-creation transaction.
a function that is marked as internal cannot be called by other contracts, unless the function is used by a derived contract. Private Functions cannot be called by any other outside contract and public variables are generating automatically a getter function.
B.
a function that is marked as external can never be called internally. Private functions can also be called by derived contracts using inheritance. Private variables are accessible also in derived contracts.
To send ether to a contract without a function call:
Options:
A.
a fallback function must be declared and it must be made payable. If there is no fallback function or the fallback function is not payable it will throw an exception.
B.
either a fallback function which is payable exists, or no fallback function at all exists.
C.
you cannot send ether to a contract without explicitly calling a function. The fallback function can never receive ether.
can't be split across multiple files, everything should be in one single file.
B.
can be split across multiple files, but every contract must be in a file with the same name as the contract itself.
C.
can be spread across multiple files. To import all contract from a file you can use "import 'myfile.sol'. To import Contract MyContract from myfile.sol you use "import {MyContract as SomeContract} from 'myfile.sol';".
When considering smart contracts and the blockchain it's good:
Options:
A.
to move all existing logic to the blockchain, so everything runs on the same system. This way it might be more complex, but easier to maintain.
B.
to move only those parts to the blockchain that really need the blockchain. This way smart contracts can be easier to read, easier to test and are not so complex.
C.
to move those parts to the blockchain that deal with Ether transfers. All other parts can remain in traditional database systems. This way only the value-transfer is on the blockchain.
Using selfdestruct(beneficiary) with the beneficiary being a contract without a payable fallback function:
Options:
A.
will throw an exception, because the fallback function is non-payable and thus cannot receive ether.
B.
it's impossible to secure a contract against receiving ether, because selfdestruct will always send ether to the address in the argument. This is a design decision of the Ethereum platform.
C.
selfdestruct doesn't send anything to a contract, it just re-assigns the owner of the contract to a new person. Sending ether must be done outside of selfdestruct.
The difference between address.send() and address.transfer() is:
Options:
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.