hedera-dev/hedera-skills

axelar-gmp

Axelar General Message Passing (GMP) on Hedera.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/hedera-dev/hedera-skills --skill axelar-gmp

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Axelar GMP (Hedera)

GMP pattern: encode a payload on the source chain, pay Axelar gas in native token, call the Gateway, then decode and act on the destination behind an allowlisted source.

text
Source app → BridgeSender (pay gas + gateway.callContract)
                 → Axelar relayers
                      → AxelarExecutable._execute → Handler

On Hedera, orchestration often pairs GMP with HSS (0x16b) so a contract can self-reschedule and dispatch each cycle. Keep bridge transport behind a thin sender interface so the orchestrator stays bridge-agnostic.

Quick Reference

PieceRole
IAxelarGatewaycallContract(destChain, destAddress, payload)
IAxelarGasServicepayNativeGasForContractCall{value} before the gateway call
AxelarExecutableDestination base; override _execute(...)
Chain namesAxelar string IDs — e.g. "hedera", "ethereum-sepolia" (not numeric chain IDs)
AddressesEVM string form of the peer contract (checksummed 0x…)

See references/hedera-axelar.md for chain-name conventions and SDK imports. See references/examples.md for sender / receiver sketches.

Critical: Gas Then Gateway

Always pay gas before callContract. Use msg.value > 0 for relay fees; refund address should be the funded orchestrator (or plan owner), not a random EOA.

solidity
gasService.payNativeGasForContractCall{ value: msg.value }(
    address(this),       // sender contract
    destinationChain,    // Axelar name string
    destinationAddress,  // receiver 0x… as string
    payload,
    refundAddress        // usually authorizedCaller / orchestrator
);
gateway.callContract(destinationChain, destinationAddress, payload);

Critical: Authorize And Allowlist

SideGuard
Source senderOnly authorizedCaller (orchestrator) may send
Destination receiverValidate srcChain + srcAddress (case-insensitive) before handling
Destination handlerOnly the receiver may call business logic (authorizedCaller)

Compare Axelar chain/address strings with a shared lowercase hash — Axelar may vary casing.

solidity
require(
    keccak256(bytes(_toLower(srcChain))) == keccak256(bytes(_toLower(expectedSourceChain))),
    "invalid source chain"
);
require(
    keccak256(bytes(_toLower(srcAddress))) == keccak256(bytes(_toLower(expectedSourceAddress))),
    "invalid source address"
);

Architecture: Split Transport From Business Logic

text
Source chain                    Destination chain
─────────────────────────────   ─────────────────────────────
Orchestrator ──send──►          MessageReceiver (_execute)
     │ BridgeSender iface              │ Handler iface
BridgeSender                    Handler (swap / settle / …)
  1. Deploy handler first (no bridge knowledge).
  2. Deploy receiver with gateway + expected source + handler.
  3. Deploy sender with gateway + gas service + destination chain/address.
  4. Deploy orchestrator with sender address; authorize orchestrator on sender.
  5. Wire after both deploys: set destination on sender; set expected source on receiver.
  6. Fund orchestrator (native for Axelar gas) and handler (tokens/capital for destination work).

Payload Contract

Agree a single ABI encode/decode on both sides. Keep payloads versionable if you evolve fields — mismatched decode bricks the route.

solidity
bytes memory payload = abi.encode(/* agreed fields… */);
// receiver:
(/* fields… */) = abi.decode(payload, (/* matching types… */));

Hedera Orchestration Hook (HSS)

When the source app schedules itself via HSS (0x16b), each cycle should:

  1. Enforce interval / plan active
  2. Call the bridge sender with native value for Axelar gas
  3. Reschedule next expiry with hasScheduleCapacity + scheduleCall (SUCCESS = 22)

If scheduling fails, mark a recovery flag and expose a manual reschedule for the plan owner.

Checklist

  • [ ] Gas paid with native value before callContract
  • [ ] Destination chain name matches Axelar’s ID (string, not numeric chain ID)
  • [ ] Peer addresses set after both contracts deploy (wire step)
  • [ ] Source allowlist + authorized callers on both ends
  • [ ] Payload encode/decode identical
  • [ ] Orchestrator funded for relay gas; destination handler funded for work
  • [ ] Demo vs production: clarify who owns destination proceeds

References

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
hedera-dev
커뮤니티

agent-kit-plugin

This skill should be used when the user asks to "create a hedera plugin", "build a hedera agent kit plugin", "extend hedera agent kit", "create custom hedera tools", "add hedera functionality", "write a hedera tool", "implement hedera tool", or needs guidance on Hedera Agent Kit plugin architecture, tool definitions, mutation tools, query tools, or parameter schemas using Zod.

1시간 설치 수
3
GitHub Stars
28
업데이트
9월 3일
hedera-dev
커뮤니티

ccip

Chainlink CCIP Cross-Chain Tokens on Hedera. Use when bridging burn-and-mint CCT between Hedera and EVM, registering TokenAdminRegistry / pools, calling ccipSend with chain selectors, or wiring HTS-backed wrappers (HtsBurnMintERC20) vs vanilla BurnMintERC20. Not for Chainlink Data Feeds / price oracles.

1시간 설치 수
3
GitHub Stars
28
업데이트
9월 3일
hedera-dev
커뮤니티

chainlink-data-feeds

Chainlink Data Feeds on Hedera. Use when reading AggregatorV3 price feeds on Hedera (testnet 296 / mainnet 295), calling latestRoundData, checking round completeness and staleness, or normalizing feed decimals. Not for Chainlink CCIP (cross-chain tokens).

1시간 설치 수
3
GitHub Stars
28
업데이트
9월 3일
hedera-dev
커뮤니티

create-harness-spec

Create a hedera-harness recipe — PRD, recipe file, validators, and optional stages — by grilling an idea into a runnable feature spec. Use when the user wants to turn a Hedera feature idea into harness inputs.

1시간 설치 수
3
GitHub Stars
28
업데이트
9월 3일