Skip to content

Conversation

@quiet-node
Copy link
Contributor

PR Description

This PR implements a complete LayerZero-based bridge solution for WHBAR (Wrapped HBAR) transfers between Hedera and Sepoli. The implementation includes deployment scripts, comprehensive E2E testing, and detailed documentation.

Deployment Infrastructure

Introduces three core deployment scripts with environment-based configuration:

  • WHBAR Contract: Wrapped HBAR deployment with deposit/withdrawal functionality
  • ERC20 Mock: Configurable test token deployment for cross-chain testing
  • OFT Adapter: LayerZero Omnichain Fungible Token Adapter for bidirectional transfers

All scripts support both Hedera and Sepolia networks with block explorer integration and comprehensive validation. Full documentation available in path-to-relay/hedera-crosschain-bridge/scripts/deployments/README.md.

End-to-End Testing

Delivers a comprehensive E2E test suite validating the complete WHBAR bridging flow:

  • Autonomous Deployment: Dynamic contract deployment without pre-deployed address dependencies
  • Bidirectional Bridge Testing: Full Hedera ↔ Sepolia transfer validation with LayerZero V2
  • Balance Verification: Rigorous tracking ensuring 1:1 cross-chain parity
  • HBAR-to-WHBAR Conversion: Native HBAR wrapping and token economics validation

Includes extensive logging, block explorer integration, and 30-minute execution timeout. Complete setup guide in path-to-relay/hedera-crosschain-bridge/test/bridging-e2e/whbar/README.md.

Key Achievements

  • ✅ Complete LayerZero V2 OFT Adapter pattern implementation
  • ✅ Bidirectional WHBAR bridge functionality (Hedera ↔ Sepolia)
  • ✅ Automated contract deployment with environment-based configuration
  • ✅ Comprehensive test coverage with autonomous infrastructure setup
  • ✅ Production-ready documentation and troubleshooting guides
  • ✅ Token economics validation ensuring 1:1 cross-chain parity
  • ✅ Integration with Hedera and Ethereum block explorers
  • ✅ LayerZero message tracking and validation

Fixes #3801

Notes for reviewer:

Checklist

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

quiet-node added 21 commits June 3, 2025 09:33
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>

q

Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
This reverts commit 06b9c2b.
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
@quiet-node quiet-node added this to the 0.69.0 milestone Jun 4, 2025
@quiet-node quiet-node self-assigned this Jun 4, 2025
@quiet-node quiet-node requested a review from a team as a code owner June 4, 2025 17:14
@quiet-node quiet-node added the enhancement New feature or request label Jun 4, 2025
@quiet-node quiet-node requested a review from a team as a code owner June 4, 2025 17:14
@quiet-node quiet-node linked an issue Jun 4, 2025 that may be closed by this pull request
17 tasks
@quiet-node quiet-node requested a review from acuarica June 4, 2025 17:14
@lfdt-bot
Copy link

lfdt-bot commented Jun 4, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link

github-actions bot commented Jun 4, 2025

Test Results

 20 files   -  2  251 suites   - 44   32m 52s ⏱️ - 2m 55s
649 tests ± 0  644 ✅ + 1  5 💤 ±0  0 ❌  - 1 
665 runs   - 80  660 ✅  - 77  5 💤 ±0  0 ❌  - 3 

Results for commit a4a0a4c. ± Comparison against base commit c839172.

♻️ This comment has been updated with latest results.

Copy link
Member

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and fantastic job so far!

Most of the helper methods can be re-used in other examples, which was the initial goal 🚀.

Only commented for now because the PR is pretty big and I'll need some more time tomorrow to finish the review entirely.

Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
@quiet-node quiet-node requested a review from natanasow June 5, 2025 21:18
natanasow
natanasow previously approved these changes Jun 6, 2025
Copy link
Member

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, some nits.

Signed-off-by: Logan Nguyen <[email protected]>
@quiet-node quiet-node merged commit 28e210e into main Jun 6, 2025
45 of 46 checks passed
@quiet-node quiet-node deleted the 3801-hedera-crosschain-bridge-case-a-whbar-bridging-implementation-and-testing branch June 6, 2025 22:35
mwb-al pushed a commit to mwb-al/hiero-json-rpc-relay that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[hedera-crosschain-bridge] Case A – WHBAR Bridging Implementation and Testing

5 participants