30 Questions
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.
True
Memory is a byte array with slot sizes of 32 bytes and is stored during function execution.
True
Only 16 stack variables are accessible in the stack.
True
Local variables of reference type in functions can only be stored in memory.
False
Local variables of value types in functions are stored in the stack.
True
Solidity is a Turing-complete language.
True
Smart contracts are necessarily related to a contract.
False
Solidity functions marked as 'external' can only be called from within the contract itself
False
Solidity functions marked as 'pure' cannot modify the contract's state
True
The 'payable' keyword in Solidity allows a function to receive Ether when called
True
The ERC-20 token standard is an example of a fungible token
True
ERC-721 tokens are non-fungible tokens (NFTs)
True
The 'decimals' value in ERC-20 tokens specifies how many decimal places a token has
True
The ERC-721 standard includes a function for minting new tokens
True
The 'fallback' function in Solidity must be internal and pure
False
ERC-1155 is an example of a multi-token standard in Ethereum
True
The 'receive' function in Solidity must be external and payable
True
Solidity functions marked as 'view' or 'pure' can modify the contract's state.
False
ERC-721 tokens are fungible tokens.
False
The 'memory' in Solidity is stored permanently on the blockchain.
False
Local variables of reference type in Solidity functions can only be stored in storage.
False
Solidity is the only language designed for Ethereum smart contract development.
False
ERC-1155 is a multi-token standard in Ethereum
True
The 'fallback' function in Solidity must be internal and pure
False
Local variables of reference type in functions can only be stored in memory
False
The 'receive' function in Solidity must be external and payable
True
Solidity is also used by Binance Smart Chain, Avalanche, and XinFin
True
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.
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.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free