
layerzero-messaging
LayerZero V2 messaging on Hedera. Use when building OFT / OApp bridges between Hedera and EVM chains, configuring Endpoint V2 peers and ULN/DVN/executor wiring, sending with quoteSend + send, implementing HTS-backed OFT connectors (mint/burn via 0x167), or relaying educational lzReceive flows on testnet.
- Installs
- 469
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/hedera-dev/hedera-skills --skill layerzero-messaging- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads layerzero-messaging automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
LayerZero Messaging (Hedera)
OFT pattern: deploy paired Omnichain Fungible Tokens — a standard OFT on the EVM side and an HTS connector OFT on Hedera — then setPeer both ways and send with LayerZero V2 fees.
OFT (EVM) ←setPeer→ HTSConnectorOFT (Hedera)
│ send / quoteSend │ _debit burn / _credit mint (HTS 0x167)
└──────── Endpoint V2 + ULN + DVN + Executor ────────┘
This skill focuses on LayerZero V2 OApp/OFT + Hedera HTS. Educational templates may use simple workers and a manual/UI lzReceive relay — not the same as production LayerZero Labs verification.
Quick Reference
| Concept | Rule |
|---|---|
| Endpoint | ILayerZeroEndpointV2 per chain |
| Peer | setPeer(remoteEid, bytes32(uint256(uint160(remoteOApp)))) on both sides |
| Send | quoteSend(SendParam, payInLzToken) → send{value: nativeFee}(SendParam, fee, refund) |
| Receiver | to in SendParam is bytes32 (padded address) |
| Hedera OFT | HTS-backed connector — create HTS token, burn on send, mint on receive |
| HTS fee | Deploy connector with native value to pay createFungibleToken |
| Approval | User must approve(connector, amount) on the HTS token before Hedera → EVM send |
| IDs | Use LayerZero EIDs in peers/dstEid — not EVM chain IDs |
See references/hedera-endpoints.md for where to source Endpoint/ULN/DVN addresses. See references/examples.md for wire and send sketches.
Critical: Wire Both Directions
Incomplete peer config bricks the pathway. For each local OApp:
setPeer(remoteEid, remoteOAppAsBytes32)setSendLibrary/setReceiveLibrary(ULN302)setConfig— ExecutorConfig (type1) on send lib; UlnConfig (type2) on send + receive libssetEnforcedOptions— e.g.lzReceivegas for msgType1(token send)
Verify with peers(remoteEid) on both chains before sending.
Critical: Hedera HTS Connector Semantics
On Hedera, do not use a plain ERC-20 OFT as the primary path. Use an HTS-backed connector:
- Constructor creates fungible HTS via precompile
0x167(supply key = connector) _debit: transfer HTS in → burn_credit: mint → transfer HTS out- Amounts must fit
int64for HTS mint/burn/transfer - Associate the receiver account with the HTS token before EVM → Hedera receives
// Deploy with value so createFungibleToken fee is paid
new HTSConnectorOFT{ value: htsCreateValue }(name, symbol, lzEndpoint, owner);
Send Flow
SendParam memory sendParam = SendParam({
dstEid: remoteEid,
to: bytes32(uint256(uint160(receiver))),
amountLD: amountLD,
minAmountLD: (amountLD * 9) / 10,
extraOptions: OptionsBuilder.newOptions().addExecutorLzReceiveOption(lzReceiveGas, 0),
composeMsg: "",
oftCmd: ""
});
MessagingFee memory fee = IOFT(localOFT).quoteSend(sendParam, false);
IOFT(localOFT).send{ value: fee.nativeFee }(sendParam, fee, payable(refundTo));
Hedera → EVM note: forge fee simulation can disagree with Hedera JSON-RPC wei/tinybar scaling — often quote via cast + scaled native fee for that direction.
Deploy Checklist (generic)
- Deploy EVM
OFT(optional premint) - Deploy Hedera HTS connector OFT with HTS create value
- Deploy workers (Labs DVN/executor or educational simple workers)
- Wire both OApps (
setPeer+ libraries + config + enforced options) - Associate Hedera account with
htsTokenAddress() - Sync frontend config if applicable; fund relay key if using UI auto-relay
- Send small amount; track on LayerZero Scan (testnet/mainnet as appropriate)
Educational Relay
Some templates use simple DVN/executor mocks and an explicit lzReceive relay step. Treat that as a learning aid — production apps rely on LayerZero’s verification network, not a custom relayer key in the app server.
Checklist
- Peers set both ways with correct EIDs (not EVM chain IDs)
- Send/receive libraries + ULN/executor config applied
- Hedera side is HTS connector; create fee paid; supply key is connector
- Receiver associated with HTS token before inbound transfers
-
quoteSendnative fee attached tosend - Receiver address encoded as
bytes32 - Educational disclaimer: not audited / not for mainnet funds
References
- references/examples.md — OFT, HTS connector, wire, send
- references/hedera-endpoints.md — EIDs vs chain IDs, where to source addresses
- LayerZero V2 docs
- LayerZero deployments metadata
FAQ
What does the layerzero-messaging skill do?
LayerZero V2 messaging on Hedera. Use when building OFT / OApp bridges between Hedera and EVM chains, configuring Endpoint V2 peers and ULN/DVN/executor wiring, sending with quoteSend + send, implementing HTS-backed OFT connectors (mint/burn via 0x167), or relaying educational lzReceive flows on testnet.
How do I install layerzero-messaging?
Run npx skills add https://github.com/hedera-dev/hedera-skills --skill layerzero-messaging in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/layerzero-messaging/ (personal) or .claude/skills/layerzero-messaging/ (project).
Which AI agents can use layerzero-messaging?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is layerzero-messaging safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains layerzero-messaging?
It is published by hedera-dev in hedera-dev/hedera-skills. It has 469 recorded installs.
More from hedera-dev/hedera-skills
hedera hackathon submission validator
hedera-dev/hedera-skills
This skill should be used when the user wants to validate, review, or score their Hedera hackathon submission before submitting. Triggered by phrases like "validate hackathon submission", "review my hackathon project", "hackathon scorecard", "check submission readiness", "score my hackathon", "submission review", "judge my project", "hackathon submission quality", or "improve hackathon score".
hedera hackathon prd
hedera-dev/hedera-skills
This skill should be used when the user wants to plan a Hedera hackathon project, create a PRD, write a project spec, brainstorm a hackathon idea, or structure their hackathon submission. Triggered by phrases like "hackathon project plan", "hackathon PRD", "plan my hackathon project", "hedera hackathon idea", "write a hackathon spec", "hackathon project structure", "prepare for hackathon", or "build for hackathon".
hedera-token-service
hedera-dev/hedera-skills
How to create, manage, and transfer tokens on Hedera using the Hiero JavaScript SDK (@hiero-ledger/sdk). Use this skill whenever the user wants to work with fungible tokens, NFTs, token creation, minting, burning, transfers, token association, custom fees (fixed, fractional, royalty), airdrops, KYC/freeze/wipe/pause operations, or any HTS (Hedera Token Service) operation in JavaScript or TypeScript. Also trigger when users mention @hashgraph/sdk token operations, ERC-20/ERC-721 equivalents on Hedera, or tokenization on the Hedera network.
hedera-consensus-service
hedera-dev/hedera-skills
How to create topics, submit messages, and subscribe to real-time message streams on Hedera using the Hiero JavaScript SDK (@hiero-ledger/sdk). Use this skill whenever the user wants to work with Hedera Consensus Service (HCS), including topic creation, message submission, pub/sub messaging, mirror node subscriptions, chunked large messages, topic fees, or any consensus-related operation in JavaScript or TypeScript. Also trigger when users mention @hashgraph/sdk topic operations, event logging on Hedera, decentralized messaging, audit trails, or ordered message streams.
project scaffolding
hedera-dev/hedera-skills
This skill should be used when the user wants to set up Claude for a project, create a CLAUDE.md file, scaffold the .claude directory, initialize an AI workflow, configure a project for Claude, set up dev intelligence, initialize a new project, or do a new project setup. Triggered by phrases like "set up claude for this project", "create CLAUDE.md", "scaffold .claude directory", "init AI workflow", "configure project for claude", "set up dev intelligence", "initialize project", "new project setup".
session management
hedera-dev/hedera-skills
This skill should be used when the user wants to resume previous work, continue from a last session, check what was being worked on, track completed work, log session activity, manage tech debt, review pending items, view session history, or maintain a work log. Triggered by phrases like "resume work", "continue from last session", "what was I working on", "track this work", "log what we did", "tech debt", "what's pending", "session history", "work log".
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.