Skip to content

Conversation

@St0rmBr3w
Copy link
Contributor

Summary

  • Add Sui Move contracts and OFT implementation for oft-main example
  • Add Starknet support with send tasks and deployment scripts
  • Add multi-VM configuration with toggle flags (INCLUDE_EVM, INCLUDE_SOLANA, INCLUDE_SUI, INCLUDE_STARKNET)
  • Add automatic full mesh pathway generation between enabled VMs
  • Clean up README with concise multi-VM instructions

Dependencies

⚠️ This PR depends on #1918 (Sui/Starknet devtools packages)

Once #1918 is merged and packages are published, this PR can be rebased onto main.

Files Added/Modified

  • examples/oft-main/ - Full example with:
    • Sui Move contracts (sui/oft/, sui/token/)
    • Starknet send tasks (tasks/starknet/)
    • Sui send tasks (tasks/sui/)
    • Multi-VM layerzero.config.ts
    • Updated README

Test plan

🤖 Generated with Claude Code

@cursor
Copy link

cursor bot commented Jan 27, 2026

PR Summary

Introduces a new examples/oft-main showcasing an Omnichain Fungible Token across EVM, Solana, Sui, and Starknet.

  • Adds EVM MyOFT contract plus Hardhat/Foundry setup and deployment script
  • Adds Solana Anchor programs (oft, endpoint-mock) with full instruction set and Cargo/Anchor configs
  • Adds multi-VM layerzero.config.ts with VM toggles and automatic full-mesh pathway generation, including enforced options per chain
  • Integrates Sui/Starknet via config and deployment file discovery (sui/deploy.json, starknet/deploy.json); updates package.json deps
  • Provides comprehensive README and docs (incl. Solana → Aptos wiring guide), environment and lint/format configs

Written by Cursor Bugbot for commit 53b9ff5. Configure here.

@socket-security
Copy link

socket-security bot commented Jan 27, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​layerzerolabs/​devtools-solana@​3.0.4721008194100

View full report

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🧪 E2E Test Status

E2E tests are non-blocking and validate real blockchain interactions. Failures may occur due to network issues, RPC rate limits, or external service downtime.

Test Runs (Newest First):

  • Run #6649 - Passed - 2026-01-27 23:10 (UTC)
  • Run #6647 - Passed - 2026-01-27 19:47 (UTC)

- Add Sui Move contracts for OFT token and OFT implementation
- Add Sui send task with proper RPC connection factory usage
- Update layerzero.config.ts with Sui pathway configuration
- Add deploy.json.example showing expected deployment format
- Update .gitignore to exclude deployment artifacts

Configuration notes:
- Enforced options order: [TO_SUI_OPTIONS, TO_EVM_OPTIONS]
- SUI_ENFORCED_OPTIONS uses 5000 gas (sufficient for Sui)
- EVM_ENFORCED_OPTIONS uses 80000 gas (sufficient for EVM)
- Refactor layerzero.config.ts with toggle flags for each VM
- Add automatic full mesh pathway generation
- Optional deployment file loading (won't crash if missing)
- Rewrite README with concise multi-VM instructions
- Add endpoint ID reference table
- Add troubleshooting section
Key fixes:
- Fix fromHex to handle odd-length hex strings by padding with leading '0'
  (Buffer.from silently truncates odd-length strings)
- Fix ByteArray encoding in setEnforcedOptions to use raw calldata instead
  of string-based encoding (starknet.js UTF-8 re-encodes bytes >= 128)
- Update sendStarknet to use createRpcUrlFactory() for RPC URL resolution
- Update starknet.js v8 Account constructor format

These fixes resolve the "out of bound" error when sending from Starknet OFT
caused by corrupted enforced options (byte 0x80 becoming UTF-8 0xc2 0x80).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant