Skip to content

docs: add Foundry advanced HTS fork testing tutorial (Part 2)#492

Open
kpachhai wants to merge 3 commits intomainfrom
foundry-forking-part-2-tut
Open

docs: add Foundry advanced HTS fork testing tutorial (Part 2)#492
kpachhai wants to merge 3 commits intomainfrom
foundry-forking-part-2-tut

Conversation

@kpachhai
Copy link
Copy Markdown
Contributor

Description:
Add new tutorial for fork testing HTS tokens with Foundry using the hedera-forking emulation layer. Covers HTSTokenManager contract, two-step deployment (forge script + cast send), 13 fork tests for token info queries, ERC-20 reads, transfers, and fork verification.

  • New: foundry/how-to-fork-the-hedera-network-with-foundry-advanced-hts
  • Update Part 1 title to include "(Part 1)" and link to Part 2
  • Add tutorial card to foundry overview, smart-contracts overview, and forking core concepts page
  • Add page to docs.json navigation

Related issue(s):

Fixes #490

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Add new tutorial for fork testing HTS tokens with Foundry using
the hedera-forking emulation layer. Covers HTSTokenManager contract,
two-step deployment (forge script + cast send), 13 fork tests for
token info queries, ERC-20 reads, transfers, and fork verification.

- New: foundry/how-to-fork-the-hedera-network-with-foundry-advanced-hts
- Update Part 1 title to include "(Part 1)" and link to Part 2
- Add tutorial card to foundry overview, smart-contracts overview,
  and forking core concepts page
- Add page to docs.json navigation

Signed-off-by: Kiran Pachhai <kiran@pachhai.com>
Signed-off-by: Kiran Pachhai <kiran.pachhai@hashgraph.com>
@kpachhai kpachhai requested review from a team as code owners March 30, 2026 21:25
@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hedera-docs 🟢 Ready View Preview Mar 30, 2026, 9:27 PM

…S tutorial

Add bonus section demonstrating a real WHBAR->USDC swap through
SaucerSwap V2 on a forked Hedera mainnet. Explains how deal()
creates balances without real tokens, how the swap executes against
real liquidity, and how vm.prank() impersonates mainnet accounts.

Signed-off-by: Kiran Pachhai <kiran@pachhai.com>
Signed-off-by: Kiran Pachhai <kiran.pachhai@hashgraph.com>
Add section demonstrating deposit WHBAR + borrow USDC against
Bonzo Finance (Aave V2 fork) on a forked Hedera mainnet. Includes
test breakdown, step-by-step flow, and mainnet contract addresses.

Signed-off-by: Kiran Pachhai <kiran@pachhai.com>
Signed-off-by: Kiran Pachhai <kiran.pachhai@hashgraph.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a second tutorial on hedera forking for advanced HTS contracts with Foundry

1 participant