Skip to content

feat: [hedera-crosschain-bridge] Case B – Custom HTS Token Bridging Implementation and Testing #3809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Jun 12, 2025

Conversation

natanasow
Copy link
Contributor

@natanasow natanasow commented May 30, 2025

Description:

To enable the June 2025 production rollout of cross-chain capabilities, we are implementing a LayerZero-based bridge for custom Hedera tokens (HTS) to and from Sepolia. This ticket covers the implementation of Case B, which focuses on the design, deployment, and testing of cross-network functionality for arbitrary HTS tokens, enabling broader asset support in the Hedera ecosystem.

This work validates that the bridging solution is flexible and reusable for new HTS tokens in production. Clear documentation and robust testing are critical, as this implementation will serve as a reference pattern for future HTS asset integrations.


Acceptance Criteria:

  • HTS Connector deployed on Hedera
  • OFT deployed on Sepolia
  • Deployment scripts added in scripts/deployment/:
    • Scripts are standalone and executed via npx hardhat run
    • Use .env for private keys, RPCs, and token configuration
    • Scripts include descriptive inline comments
  • Integration tests written in test/deployment/:
    • Tests programmatically deploy contracts before each test run
    • No reliance on pre-generated .env-based addresses
    • Validate bidirectional bridging behavior (HTS ⇄ ERC20)
  • README section updated for custom HTS token bridging:
    • Deployment instructions for HTS tokens and adapters
  • Code and scripts follow consistent structure and naming conventions
  • Code is well-documented and suitable for future developer handoff or audit

Proposed Solution:

  1. Create and deploy ERC20 on Sepolia
  2. Create and deploy HTS Connector on Hedera
  3. Develop modular, well-documented deployment scripts in a dedicated folder
  4. Implement dynamic, isolated test cases that simulate HTS bridging scenarios
  5. Extend the project README with instructions and configuration examples specific to HTS bridging

Related issue(s):

Fixes #3802
Fixes #3799

Notes for reviewer:

Checklist

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

quiet-node and others added 10 commits May 29, 2025 09:32
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

chore: removed chainId config definition in Hardhat config

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

fix: updated .env.example to correct configs

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

chore: cleaned up README.md

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

chore: cleaned up folder structure

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

feat: added network configs

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

build(deps): installed deps

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow natanasow self-assigned this May 30, 2025
@natanasow natanasow added the enhancement New feature or request label May 30, 2025
@natanasow natanasow added this to the 0.69.0 milestone May 30, 2025
@lfdt-bot
Copy link

lfdt-bot commented May 30, 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)

@natanasow natanasow changed the title chore: add contracts and deployment scripts feat: [hedera-crosschain-bridge] Case B – Custom HTS Token Bridging Implementation and Testing May 30, 2025
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 3801-hedera-crosschain-bridge-case-a-whbar-bridging-implementation-and-testing branch from 547a460 to 0caec04 Compare May 30, 2025 20:38
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
This reverts commit 06b9c2b.
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 3801-hedera-crosschain-bridge-case-a-whbar-bridging-implementation-and-testing branch from 0caec04 to f942bae Compare May 30, 2025 20:39
quiet-node and others added 5 commits May 30, 2025 15:46
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
…lementation-and-testing' into 3802-case-b-custom-hts-bridging
Signed-off-by: Quiet Node <logan@quiet-node.dev>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
quiet-node and others added 4 commits June 5, 2025 09:34
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
…se-a-whbar-bridging-implementation-and-testing' into 3801-hedera-crosschain-bridge-case-a-whbar-bridging-implementation-and-testing
…lementation-and-testing' into 3802-case-b-custom-hts-bridging
@natanasow natanasow marked this pull request as ready for review June 6, 2025 06:42
@natanasow natanasow requested review from a team as code owners June 6, 2025 06:42
@natanasow natanasow requested a review from simzzz June 6, 2025 06:42
natanasow added 2 commits June 6, 2025 11:43
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Base automatically changed from 3801-hedera-crosschain-bridge-case-a-whbar-bridging-implementation-and-testing to main June 6, 2025 22:35
natanasow added 2 commits June 9, 2025 09:53
# Conflicts:
#	tools/hedera-crosschain-bridge/.env.example
#	tools/hedera-crosschain-bridge/package.json
#	tools/hedera-crosschain-bridge/scripts/deployments/README.md
#	tools/hedera-crosschain-bridge/test/bridging-e2e/whbar/whbar-e2e-hedera-sepolia.spec.ts
#	tools/hedera-crosschain-bridge/test/utils/helpers.ts
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Copy link

github-actions bot commented Jun 9, 2025

Test Results

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

Results for commit f34ac0c. ± Comparison against base commit 28e210e.

♻️ This comment has been updated with latest results.

@natanasow natanasow requested a review from quiet-node June 9, 2025 09:55
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
@natanasow natanasow requested review from simzzz and quiet-node June 11, 2025 06:03
@natanasow natanasow merged commit bd078cf into main Jun 12, 2025
67 of 69 checks passed
@natanasow natanasow deleted the 3802-case-b-custom-hts-bridging branch June 12, 2025 06:51
mwb-al pushed a commit to mwb-al/hiero-json-rpc-relay that referenced this pull request Jun 23, 2025
…mplementation and Testing (hiero-ledger#3809)

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: nikolay <n.atanasow94@gmail.com>
Signed-off-by: Quiet Node <logan@quiet-node.dev>
Co-authored-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
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
4 participants