Menu

Post image 1
Post image 2
1 / 2
0

I Built an ERC-20 Token and React dApp from Scratch Complete Web3 Breakdown

DEV Community·Carter·30 days ago
#B0zAI05t
Reading 0:00
15s threshold

Most Web3 tutorials give you a token contract and stop there. I went furtherand built the full stack: a Solidity ERC-20 token, a Hardhat test suite, and a React dApp with MetaMask integration and transaction history. Here is every technical decision I made. GitHub: https://github.com/Carter254g/harambee-dapp What I Built HarambeeCoin (HBC) is a custom ERC-20 token. The dApp lets you connect MetaMask, check your balance, send tokens, and see your full transaction history — sent and received. The Smart Contract I wrote HarambeeCoin from scratch without OpenZeppelin to understand every line. The core is four functions: function transfer(address to, uint256 amount) public returns (bool) { require(balanceOf[msg.sender] >= amount, "Insufficient balance"); balanceOf[msg.sender] -= amount; balanceOf[to] += amount; emit Transfer(msg.sender, to, amount); return true; } Enter fullscreen mode Exit fullscreen mode I also added mint (owner only) and burn (any holder) on top of the standard ERC-20 interface.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More