Programming in Blockchain

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

Flashcards based on key concepts from the Programming in Blockchain lecture notes, covering Smart Contracts, their structures, functions, and advantages in various applications.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

What is a Smart Contract?

A Smart Contract is a computer program that runs on a blockchain and defines a set of rules for parties to interact with, executing automatically when conditions are met.

2
New cards

What are the benefits of Smart Contracts?

They are simple, faster to execute, cheaper since no middlemen are needed, and have no delays in delivering outcomes.

3
New cards

What is the role of public keys in Smart Contracts?

Public keys serve as blockchain addresses for participants, identifying them in transactions.

4
New cards

Name the two types of function calls in Solidity.

Internal and external function calls.

5
New cards

What is a Decentralized Application (DApp)?

A DApp is a blockchain-based application that combines a smart contract and a frontend user interface.

6
New cards

What does PKI stand for in blockchain technologies?

PKI stands for Public-Key Infrastructure.

7
New cards

What are the four types of Smart Contracts?

  1. Smart Legal Contracts, 2. DApps, 3. DAO (Decentralized Autonomous Organization), 4. Smart Contracting Devices.
8
New cards

What does a constructor function do in Solidity?

A constructor function initializes state variables when the contract is first deployed.

9
New cards

What is the difference between value types and reference types in Solidity?

Value types store their own data and are passed by value; reference types store the location of the data and can share data among variables.

10
New cards

What is the purpose of visibility quantifiers in Solidity?

Visibility quantifiers define the accessibility of functions and state variables within contracts.

11
New cards

What is error handling in Solidity?

Error handling in Solidity is done using methods like assert, require, and revert to manage conditions that can lead to execution failure.

12
New cards

What is the function of the fallback function in Solidity?

The fallback function is called when a non-existent function is invoked on the contract, and it must be marked external.

13
New cards

How do Smart Contracts verify ownership and transactions?

Smart Contracts use blockchain validation across nodes to confirm ownership and conditions before executing transfers.

14
New cards

What programming language is primarily used for developing Smart Contracts?

Solidity is the primary programming language used for developing Smart Contracts.

15
New cards

What happens when conditions in a Smart Contract are verified and met?

The Smart Contract automatically executes the agreed terms, such as transferring ownership or funds.

16
New cards

What is the structure of a Smart Contract?

A Smart Contract consists of variables, functions, events, and may include modifiers to control access.

17
New cards

What is a mapping in Solidity?

A mapping is a reference type that stores data in key-value pairs.

18
New cards

What is a DApp's relationship with Smart Contracts?

DApps interact with Smart Contracts to function while providing a user interface.

19
New cards

What does it mean for a Smart Contract to be decentralized?

It operates on a blockchain without a central authority and is validated by nodes in the network.

20
New cards

What is the significance of testing Ether in the deployment process with MetaMask?

Testing Ether is necessary to simulate transactions and testing in a test network before going live.

21
New cards

What is an event in Solidity?

An event is an inheritable member of a contract that gets logged and stored on the blockchain for future reference.

22
New cards

What is a fireblock?

A fireblock is a barrier used to slow the spread of fire within a building. They are often made of non-combustible materials and are installed in wall and floor cavities.

23
New cards

Where are fireblocks commonly installed?

Fireblocks are typically installed in areas where vertical and horizontal spaces, like attics, ceilings, and walls, intersect, such as around pipes and ducts.

24
New cards

What is the purpose of fireblocks?

The main purpose of fireblocks is to provide fire stopping, preventing flames and heat from traversing through concealed spaces which could lead to fire spreading