To get most out of the blockchain, it is best:
A. to use it for the whole business logic. It’s always best to have everything in once place.
B. to use it only for things which need the benefits of the blockchain
Checking the balance of an address inside a loop of a smart contract constantly:
A. doesn't cost any gas.
B. cost gas every time we check the balance.
Gas costs accrue on sending a transaction:
A. no matter the content.
B. only with a new smart contract deployment.
C. only interacting with an already deployed smart contract
Files can be imported:
A. using relative and absolute paths, where the "." And the ".." depict that it's a relative path.
B. only via GitHub using the Repository and Username
C. using the special requirefile(...) statement, which looks in a specific library path to import files.
Externally Owned Accounts (EoA):
A. are changing their address every time a Transaction is sent because of the nonce.
B. are keeping their address, but on the blockchain a nonce is increased every time they send a transaction to avoid replay attacks.
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.
B. for which blockchain a smart contract was developed for. It helps to avoid confusion with beta-customers.
C. for which blockchain node a smart contract was developed for. It helps to avoid mixing up different versions of go-ethereum.
Ethereum Nodes:
A. must implement the Ethereum protocol and external access can only be done via the proprietary Ethereum Libraries like Web3.js.
B. must implement the Ethereum Protocol and a JSON-RPC to talk with clients.
C. must implement Web3.js to interact with Websites.
A Private Network is:
A. a side Channel to the Ethereum Main Net which costs less gas to run smart contracts.
B. an exact clone of the Rinkeby Test-Network which can be started as virtual machine in the Azure Cloud.
C. a Network running only in a private area, where people cannot join freely and openly.
You need to use ____________ to get the address that initiated the transaction.
A. Tx.origin
B. Msg.sender
To compare a String in Solidity you use:
A. string1 == string2
B. the internal function "str_compare(str1,str2)"
C. you can't directly compare two strings, but one method would be to hash both strings and compare the hashes.
D. bytes32(string1) == bytes32(string2)
Smart Contracts:
A. 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.
View and Pure Functions:
A. can only be accessed during calls.
B. can be accessed during transactions and calls.
Page 2 out of 9 Pages |
Previous |