اصلي منځپانګې ته لاړ شئ
JobCannon
ټول مهارتونه

ERC-20 Token Standard

⬢ درجه 1تخنیکي
لوړ
د معاش اغېز
1 میاشتې
د زده کړې وخت
منځنی
سختوالی
—
مسلکونه
په یوه نظر

ERC-20 is the Ethereum standard for fungible tokens (identical, interchangeable). Think of them like dollars, one unit equals another. ERC-20 contracts define balances, transfers, and approvals. Every major token (USDC, DAI, LINK) is ERC-20. Learning takes 1-2 weeks for Solidity devs; mastery (minting, burning, access control, security) takes 2-3 months. Senior token engineers earn $150K+ because poorly-designed tokens leak millions to hacks.

ERC-20 Token Standard څه شی دی

ERC-20 is Ethereum's standard for fungible tokens, digital assets where each unit is identical and interchangeable. Think of them like dollars: one $1 bill equals another $1 bill. ERC-20 contracts implement a standard interface: balanceOf (check balance), transfer (send tokens), approve (allow someone else to spend), and transferFrom (spend approved tokens). Exchanges, wallets, and DeFi protocols understand ERC-20 because the interface is standardized. Deploy an ERC-20 contract and it automatically works on OpenSea, Uniswap, MetaMask, no integration needed.

🔧 وسیلې او ایکوسیستم
SolidityOpenZeppelin contractsHardhat or TruffleWeb3.js or Ethers.jsMetaMaskRemix IDE

💰 د سیمې له مخې معاش

سیمهجونیرمنځنیسېنیر
USA$90k$150k$230k
UK£55k£92k£140k
EU€60k€100k€150k
CANADAC$95kC$160kC$250k

❓ ډېرې پوښتل شوې پوښتنې

What's the difference between transfer() and transferFrom()?
transfer: I send tokens directly from my wallet to someone else. transferFrom: Someone already approved me to spend X tokens, and I move them. Approve first, then transferFrom. Like pre-authorizing a merchant to charge your card.
Why do I need approve() before transferFrom()?
Security. If transfer was automatic, approving a contract to swap tokens would give it unlimited access to your wallet. Approve limits the contract's spending to a specific amount. Revoke approval when done.
What happens if total supply is unlimited?
Token value approaches zero due to inflation. Most tokens cap total supply. Some (like Ethereum's ETH) don't have a hard cap, but have emission schedules. Set totalSupply to a number and enforce it.
How do I implement taxes or fees on transfers?
Override transfer() and transferFrom(). Calculate 2% fee, send to treasury, transfer remaining 98% to recipient. But this breaks expected behavior, users send 100 tokens, receive 98. Consider this UX impact.
Can I make tokens non-transferable?
Yes. Override transfer and revert if !isOwner. Used for vesting tokens (employees can't sell for X years). Or use pausable pattern: owner can pause transfers globally.

ډاډه نه یاست چې دا مهارت ستاسو لپاره دی؟

د کاري مسلک سمون ازموینه واخلئ — موږ به تاسو ته سمې لارې وړاندیز کړو.

زما لپاره غوره مهارتونه ومومئ →

خپل غوره مسلکي لاره ومومئ

د ۲٬۵۲۱ مسلکونو په اوږدو کې د مهارت پر بنسټ سمون. وړیا.

د کاري مسلک سمون ازموینه واخلئ — وړیا →