Skip to content

feat(aptos): add wormhole support#628

Open
karim-en wants to merge 3 commits into
aptosfrom
aptos-wormhole
Open

feat(aptos): add wormhole support#628
karim-en wants to merge 3 commits into
aptosfrom
aptos-wormhole

Conversation

@karim-en

@karim-en karim-en commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces optional Wormhole integration into the Aptos OmniBridge, enabling the bridge to emit Wormhole VAAs (Verifiable Action Approvals) for key bridge actions, with full parity to the EVM implementation. The integration is controlled by an admin-settable flag, and includes new payload encoders, on-chain wiring to the Wormhole emitter, and comprehensive test coverage. The bridge remains fully functional when Wormhole publishing is disabled.

The most important changes are:

Wormhole Integration and Control

  • The bridge now registers as a Wormhole emitter in initialize and stores the EmitterCapability in BridgeState. Admins can enable or disable Wormhole publishing at any time using the new set_wormhole_enabled entry function, which simply toggles a flag. The same emitter ID is used across enable/disable cycles, providing a stable identity for off-chain consumers. [1] [2] [3] [4] [5] [6]

Wormhole Payload Publishing in Bridge Actions

  • When Wormhole publishing is enabled, every successful init_transfer, fin_transfer, deploy_token, and log_metadata action emits a Wormhole VAA. The caller pays the Wormhole message fee in Coin<AptosCoin>, and the payloads mirror the EVM OmniBridgeWormhole.sol byte layout for cross-chain compatibility. [1] [2] [3] [4] [5]

Wormhole Payload Encoders

  • Four new Wormhole payload encoder functions are added to bridge_types.move, matching the EVM-side byte layouts exactly: init_transfer_wormhole_payload, fin_transfer_wormhole_payload, deploy_token_wormhole_payload, and log_metadata_wormhole_payload. These ensure consistent cross-chain message formats. [1] [2]

Stubbed Wormhole Dependency

  • The Wormhole Move package is vendored as a compile-time-only stub at vendor/wormhole, allowing the bridge to compile against the deployed Wormhole ABI without republishing the modules. This is documented in both Move.toml and the code. [1] [2]

Expanded Documentation and Test Coverage

  • The documentation (CLAUDE.md) is updated to reflect the new Wormhole integration, including module layout, admin controls, and rationale for the stub. Test coverage is expanded to include Wormhole payload layouts and the gating logic for enabling/disabling publishing. [1] [2] [3] [4]

@karim-en karim-en marked this pull request as ready for review June 9, 2026 21:29
@karim-en karim-en requested a review from a team June 9, 2026 21:29
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.

1 participant