Lesson 1 of 0
In Progress
Class 17
Class 17 – Blockchain & Smart Contract Basics
Slides:Class17
In this lecture, we focus on foundational concepts of Blockchain, particularly the Ethereum platform and Smart Contracts.
- Address in Ethereum:
- Defined as a 20-byte data type, designed to hold both contract and externally owned account (EOA) addresses.
- Addresses have specific properties such as balance retrieval and the ability to hold Ether (with payable addresses).
- Address Functions:
- Send Function: Used for transferring Ether with a fixed gas limit, returns a boolean and does not throw exceptions on failure.
- Transfer Function: Similar to send but raises exceptions on failure, making it the preferred method for secure Ether transfers.
- Mappings in Solidity:
- Mappings function similarly to hash tables, allowing the storage of key-value pairs.
- Useful for state variables in contracts but do not have a concept of key-value length.
- Mappings are widely used for their flexibility and efficiency in storing and retrieving data.
This session deepened the understanding of how addresses and mappings work within Ethereum’s blockchain environment, laying the groundwork for more complex smart contract development.
