Smart Contracts and Solidity Programming Quiz
30 Questions
24 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

Smart contracts were first proposed in the 1990s as a digital form of promises.

True

Solidity is a dynamically-typed language designed for Ethereum.

False

Solidity is also used by Binance Smart Chain, Avalanche, and XinFin.

True

The storage in the blockchain is permanent and expensive.

<p>True</p> Signup and view all the answers

Memory is a byte array with slot sizes of 32 bytes and is stored during function execution.

<p>True</p> Signup and view all the answers

Only 16 stack variables are accessible in the stack.

<p>True</p> Signup and view all the answers

Local variables of reference type in functions can only be stored in memory.

<p>False</p> Signup and view all the answers

Local variables of value types in functions are stored in the stack.

<p>True</p> Signup and view all the answers

Solidity is a Turing-complete language.

<p>True</p> Signup and view all the answers

Smart contracts are necessarily related to a contract.

<p>False</p> Signup and view all the answers

Solidity functions marked as 'external' can only be called from within the contract itself

<p>False</p> Signup and view all the answers

Solidity functions marked as 'pure' cannot modify the contract's state

<p>True</p> Signup and view all the answers

The 'payable' keyword in Solidity allows a function to receive Ether when called

<p>True</p> Signup and view all the answers

The ERC-20 token standard is an example of a fungible token

<p>True</p> Signup and view all the answers

ERC-721 tokens are non-fungible tokens (NFTs)

<p>True</p> Signup and view all the answers

The 'decimals' value in ERC-20 tokens specifies how many decimal places a token has

<p>True</p> Signup and view all the answers

The ERC-721 standard includes a function for minting new tokens

<p>True</p> Signup and view all the answers

The 'fallback' function in Solidity must be internal and pure

<p>False</p> Signup and view all the answers

ERC-1155 is an example of a multi-token standard in Ethereum

<p>True</p> Signup and view all the answers

The 'receive' function in Solidity must be external and payable

<p>True</p> Signup and view all the answers

Solidity functions marked as 'view' or 'pure' can modify the contract's state.

<p>False</p> Signup and view all the answers

ERC-721 tokens are fungible tokens.

<p>False</p> Signup and view all the answers

The 'memory' in Solidity is stored permanently on the blockchain.

<p>False</p> Signup and view all the answers

Local variables of reference type in Solidity functions can only be stored in storage.

<p>False</p> Signup and view all the answers

Solidity is the only language designed for Ethereum smart contract development.

<p>False</p> Signup and view all the answers

ERC-1155 is a multi-token standard in Ethereum

<p>True</p> Signup and view all the answers

The 'fallback' function in Solidity must be internal and pure

<p>False</p> Signup and view all the answers

Local variables of reference type in functions can only be stored in memory

<p>False</p> Signup and view all the answers

The 'receive' function in Solidity must be external and payable

<p>True</p> Signup and view all the answers

Solidity is also used by Binance Smart Chain, Avalanche, and XinFin

<p>True</p> Signup and view all the answers

Study Notes

Smart Contracts and Solidity

  • Smart contracts were first proposed in the 1990s as a digital form of promises.
  • Solidity is a dynamically-typed language designed for Ethereum, but also used by Binance Smart Chain, Avalanche, and XinFin.

Storage and Memory in Solidity

  • Storage in the blockchain is permanent and expensive.
  • Memory is a byte array with slot sizes of 32 bytes and is stored during function execution.
  • Only 16 stack variables are accessible in the stack.
  • Local variables of reference type in functions can only be stored in memory.
  • Local variables of value types in functions are stored in the stack.

Solidity Language Features

  • Solidity is a Turing-complete language.
  • Functions marked as 'external' can only be called from within the contract itself.
  • Functions marked as 'pure' cannot modify the contract's state.
  • The 'payable' keyword allows a function to receive Ether when called.
  • The 'view' function does not modify the contract's state.
  • The 'fallback' function must be internal and pure.
  • The 'receive' function must be external and payable.

Token Standards

  • ERC-20 is an example of a fungible token standard.
  • ERC-721 tokens are non-fungible tokens (NFTs).
  • The 'decimals' value in ERC-20 tokens specifies how many decimal places a token has.
  • The ERC-721 standard includes a function for minting new tokens.
  • ERC-1155 is an example of a multi-token standard in Ethereum.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Test your knowledge of smart contracts, Solidity programming, token standards, and smart contract security with this quiz. Explore the basic structure of smart contracts, token standards like ERC20 and ERC721, and the lifecycle of smart contracts.

More Like This

Solidity
8 questions

Solidity

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