Manav Gandhi's Avatar

Manav Gandhi

@manavgandhi27

Full Stack Software Engineer building scalable, production-grade systems. Experience across frontend, backend, and system design. I value clean architecture, correctness, and solving real business problems.

35
Followers
174
Following
773
Posts
12.01.2026
Joined
Posts Following

Latest posts by Manav Gandhi @manavgandhi27

Questions for Foundry users:
→ What's your testing workflow?
→ How do you approach fuzz testing?
→ Gas optimization benchmark process?
Replies become Day 19. 👇
#BuildingInPublic #Web3

10.03.2026 23:45 👍 0 🔁 0 💬 0 📌 0
Preview
GitHub - 27manavgandhi/-100xDevs-Cohort3-Web3 Contribute to 27manavgandhi/-100xDevs-Cohort3-Web3 development by creating an account on GitHub.

This is how production teams work.
Fast tests, comprehensive coverage, production tooling.
Code → buff.ly/cIKv55G
Deep dive → buff.ly/twNsF5O

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

The progression:
Day 15: Wrote Solidity contracts
Day 16: Made contracts communicate
Day 17: Created ERC-20 tokens
Day 18: Production dev environment
From writing code → testing like production teams.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

The speed difference is real:
Hardhat test: 10 seconds
Foundry test: 100 milliseconds
100x faster.
When you have hundreds of tests, this compounds.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Why cheat codes matter:
Without them:
→ Deploy contracts
→ Fund multiple wallets
→ Sign from each wallet
→ Wait for confirmations
With them:
→ Instant balance
→ Instant impersonation
→ Tests run in milliseconds

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Real-world analogy:
vm.prank → Borrow friend's ID for one store visit
vm.startPrank → Borrow ID, use it all day
vm.stopPrank → Return ID, use your own
This is how you test different users interacting with contract.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Testing cheat codes:
vm.deal → Set balance of address
vm.prank → Impersonate for one tx
vm.startPrank → Impersonate for multiple txs
vm.stopPrank → Stop impersonating
vm.hoax → Prank with ETH for one tx

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Testing events with Foundry:
vm.expectEmit checks if event was emitted correctly
You specify:
→ Check from address?
→ Check to address?
→ Check value?
Then execute transaction and verify.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Why events matter:
Logging: Record important actions
Off-chain tracking: Frontends listen to events
Gas efficient: Cheaper than storage
Searchable: Indexed parameters
Without events, frontends couldn't track on-chain activity.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Events in Solidity:
How contracts log important actions.
Example: Token transfer emits event
→ Who sent (indexed)
→ Who received (indexed)
→ How much (data)
Indexed = searchable
This is how Etherscan filters transactions.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Foundry has 4 parts:
Forge → Testing framework (like Anchor)
Cast → Interact with contracts (like spl-token cli)
Anvil → Local node (like solana-test-validator)
Chisel → Solidity REPL
Complete toolkit.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Why Foundry is faster:
Hardhat:
→ Contract in Solidity
→ Test in JavaScript
→ Context switch every test
Foundry:
→ Contract in Solidity
→ Test in Solidity
→ Same language, same VM
10-100x speed difference.

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0

Evolution of Ethereum dev tools:
Ganache → Local blockchain (like test validator)
Truffle → Classic framework
Hardhat → Modern (JS/TS testing)
Foundry → Game changer (Solidity testing)
Each generation got faster.

10.03.2026 23:45 👍 1 🔁 0 💬 1 📌 0

Day 18 of learning Web3 in public.
I set up production Solidity development environment.
Here's why Foundry is 10-100x faster than Hardhat 🧵

10.03.2026 23:45 👍 0 🔁 0 💬 1 📌 0
Medium

Day 18: I Set Up a Production Solidity Development Environment. Here's Why Foundry Changed Everything - buff.ly/twNsF5O

10.03.2026 23:30 👍 0 🔁 0 💬 0 📌 0

SOL-USDC strategy rocks!

10.03.2026 18:19 👍 0 🔁 0 💬 0 📌 0

Absolutely, key for growth!

10.03.2026 18:19 👍 0 🔁 0 💬 0 📌 0
Preview
Day 17: I Created My Own Cryptocurrency. Here’s How ERC-20 Tokens Actually Work. Custom tokens, token standards, balances mapping, allowances, and building a complete ERC-20 token from scratch — the foundation of every…

Day 17: I Created My Own Cryptocurrency. Here's How ERC-20 Tokens Actually Work -

10.03.2026 03:19 👍 0 🔁 0 💬 0 📌 0

Questions for token builders:
→ How do you design sustainable tokenomics?
→ Infinite approvals — safe or risky?
→ Best token launch strategy?
Replies become Day 18. 👇
#BuildingInPublic #Web3

10.03.2026 02:30 👍 0 🔁 0 💬 0 📌 0
GitHub - 27manavgandhi/-100xDevs-Cohort3-Web3 Contribute to 27manavgandhi/-100xDevs-Cohort3-Web3 development by creating an account on GitHub.

This is how DeFi works.
Every protocol runs on custom tokens.
Code → buff.ly/nOXlHVI
Deep dive → buff.ly/M0zlGIU

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

The progression:
Day 2: Created wallets
Day 14: Built cloud wallet
Day 15: Wrote smart contracts
Day 16: Made contracts communicate
Day 17: Created digital assets
From using → building → creating assets.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

OpenZeppelin:
Production-ready token in 7 lines.
Audited, battle-tested, gas-optimized.
Don't write ERC-20 from scratch.
Use OpenZeppelin.
Every serious DeFi protocol does.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

Allowances enable:
→ Uniswap swaps
→ Aave deposits
→ Compound lending
→ Curve liquidity pools
Every DeFi interaction uses approve + transferFrom.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

How Uniswap uses allowances:

You approve Uniswap to spend 100 USDC
You call swap function
Uniswap pulls your USDC using transferFrom
Uniswap sends you ETH

Without allowances, DeFi wouldn't exist.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

Allowances: The DeFi Enabler
You can grant permission for another address to spend your tokens on your behalf.
Like giving a friend your ATM card with a spending limit.
This is how all DeFi works.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

Real-world example:
Company rewards program:
Mint: Give customer 500 points
Transfer: Customer gifts 100 points to friend
Burn: Customer spends 200 points for discount
Same mechanics as blockchain tokens.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

What I built:
KiratCoin Token
Features:
→ Mint (create new tokens)
→ Transfer (send to others)
→ Burn (destroy tokens)
Think of it as company reward points on blockchain.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

What is a token?

Digital money on blockchain
Has an issuer who controls supply
Record of who owns how much
Users can transfer between addresses

Like Amazon gift cards on the blockchain.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

Key Insight:
Your wallet doesn't store custom tokens.
It queries the smart contract's storage to display your balance.
Every custom token on Ethereum is a separate contract.

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0

Storage: The Critical Distinction
Native ETH:
→ Stored in your wallet balance
→ Like cash in your bank account
Custom Tokens:
→ Stored in contract storage
→ Like items in lockers managed by the bank

10.03.2026 02:30 👍 0 🔁 0 💬 1 📌 0