W3

Smart Contract Demo Lab

web3.nasirovpe.com

Projects/ERC20 Token Smart Contract

Simulated demo

ERC20 Token Smart Contract

Manual ERC20-style token implementation with transfers, approvals, allowances, delegated transfers, owner-only minting, and complete unit tests.

ERC20AllowanceMintUnit Tests

What this demonstrates

A manual ERC20-style token: balances, transfers, allowances, and delegated transferFrom flows.

Key Solidity concepts

  • Balance mappings and transfer logic
  • approve and allowance bookkeeping
  • transferFrom with allowance checks
  • Owner-controlled minting (where applicable)

Demo scope

Token balances and transfers are simulated in the UI. No contract is deployed or called from this site.

Hand-rolled token logic for learning; not audited. Production tokens should use battle-tested libraries and formal review.

Alice

1000 LAB

Bob

250 LAB

Current allowance for Bob (spender): 100 LAB

transferFrom lets an approved spender move tokens on behalf of the owner, up to the allowance limit.

Token activity

  • Balances loaded (mock).

Key features

  • transfer / approve / transferFrom flow
  • Allowance-based delegated transfers
  • Owner-only minting controls
  • Complete unit test coverage