Smart Contracts and Solidity Programming
20 Questions
3 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary purpose of a smart contract?

  • To establish initial states in a blockchain
  • To make digital promises related to blockchain transactions (correct)
  • To store and refund gas in a blockchain
  • To execute computations unrelated to blockchain transactions

Which programming language is designed for Ethereum smart contracts?

  • Rust
  • JavaScript
  • Solidity (correct)
  • C++

What type of tokens does ERC20 represent?

  • Immutable tokens
  • Non-fungible tokens
  • Blockchain security tokens
  • Fungible tokens (correct)

Which type of variables are stored in the blockchain permanently?

<p>State variables (A)</p> Signup and view all the answers

What is the size of an Ethereum address?

<p>20 bytes (B)</p> Signup and view all the answers

Which type of memory is stored during function execution and is cheaper?

<p>Memory (A)</p> Signup and view all the answers

What type of tokens does ERC721 represent?

<p>Non-fungible tokens (D)</p> Signup and view all the answers

Which type of variables are cheapest and manipulated by inline assembly?

<p>Stack variables (C)</p> Signup and view all the answers

What type of value does the 'address' variable represent?

<p>20-byte value (size of an Ethereum address) (C)</p> Signup and view all the answers

What was the first proposed year of smart contracts?

<p>1990s (C)</p> Signup and view all the answers

What is the visibility of a state variable that can be accessed by the defined / derived contract?

<p>Internal (A)</p> Signup and view all the answers

Which function visibility allows other contracts to read their values?

<p>Public (C)</p> Signup and view all the answers

What type of function can not modify states or call other non-view functions?

<p>View functions (D)</p> Signup and view all the answers

Which special function must be external and payable with no function keyword, arguments, or return values?

<p>Fallback function (D)</p> Signup and view all the answers

What is the ERC standard for Fungible token?

<p>ERC-20 (B)</p> Signup and view all the answers

What does ERC-721 represent?

<p>An extension of ERC-721 interface (B)</p> Signup and view all the answers

How is 0.5 ETH sent using decimals?

<p>Use decimals = 1, transfer(to, 5) (A)</p> Signup and view all the answers

What does ABI stand for in Ethereum?

<p>Application Binary Interface (C)</p> Signup and view all the answers

"mint" and "transferFrom" are part of the implementation of which standard?

<p>ERC-20 (A)</p> Signup and view all the answers

"Point to a JSON file describing the token attributes (name, description, image…)" is related to which standard?

<p>&quot;ERC-721&quot; (B)</p> Signup and view all the answers

More Like This

Solidity
8 questions

Solidity

ProblemFreeHeliotrope5400 avatar
ProblemFreeHeliotrope5400
Blockchain und Smart Contracts
10 questions
Use Quizgecko on...
Browser
Browser