Smart Contracts & Tokens

EVM bytecode, ABIs, ERC-20/721, Solana programs and accounts — and where your staking contract fits.

10 min read·4 quiz questions

Contracts on the EVM

Solidity compiles to EVM bytecode deployed at an address. Its ABI describes the callable functions and events so wallets and libraries like ethers.js can encode calls. State lives in contract storage; reads are free, writes cost gas.

  • view/pure calls: no gas, no transaction.
  • state-changing calls: signed transaction + gas.
  • events: cheap logs your UI can index.

Token standards

ERC-20 defines fungible tokens (balanceOf, transfer, approve). ERC-721 and ERC-1155 cover NFTs and multi-tokens. Standards are interfaces, not enforcement, so always read the code you interact with.

Solana's model

Solana separates code from data: programs are stateless executables, and every piece of state is a separate account passed into the instruction. SPL Token is a single program managing all token accounts.

Your staking lab contract

SimpleStaking accepts native ETH on Base Sepolia, accrues linear rewards over time, and pays out from an owner-funded reward pool. In the Staking Lab you deploy it, fund it, stake, claim and unstake while the checklist verifies each step.

Key terms

ABI
JSON description of a contract's functions and events used to encode calls.
ERC-20
Fungible token interface on EVM chains.
Approve/allowance
Permission letting a contract move your tokens up to a limit.
Program (Solana)
Stateless on-chain executable; state lives in separate accounts.

Chapter quiz

4 questions · pass mark 75%
  1. 1. What is an ABI used for?

  2. 2. Which call does NOT need a signed transaction?

  3. 3. On Solana, program state is stored…

  4. 4. In the staking lab, rewards are paid from…

Answer every question to submit. Progress for smart-contracts-and-tokens is saved in this browser.