lessonΒ·25 minΒ·Chapter 3 of 3
Variables & Data Types
Solidity has three types of variables: state variables (stored on blockchain, cost gas to modify), local variables (exist only during function execution), and global variables (provide blockchain info like msg.sender, block.timestamp). Basic types include: uint (unsigned integers of various sizes), int (signed integers), address (20-byte Ethereum address), bool, string, and bytes. The default uint is uint256. Address types have special members like .balance and .transfer().
π‘ Key Takeaway
This lesson covers the fundamental concepts. Make sure you understand these before moving to the next chapter.