axelar-gmp — скилл для Claude Code: что делает и как установить
Помогает строить межсетевые вызовы между Hedera и EVM через Axelar GMP. Нужен при отправке транзакций через шлюз, настройке приёмников и связке с HSS.
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-codeЧто делает axelar-gmp
Скилл задаёт архитектуру Axelar General Message Passing на Hedera. Он учит агента разделять транспорт моста и бизнес-логику: на стороне источника выставляется контракт-отправитель с проверкой authorizedCaller, а на стороне назначения — контракт AxelarExecutable, сверяющий адрес источника через хэш в нижнем регистре.
Порядок вызовов критичен. Сначала контракт обязан оплатить релей через payNativeGasForContractCall, и только затем вызывать callContract в шлюзе. Сдачу за газ должен забирать оркестратор. Числовые ID здесь сломают маршрутизацию. Axelar принимает исключительно строковые имена сетей вроде "hedera" или "ethereum-sepolia".
Для регулярных циклов логика связывается с контрактом Hedera Schedule Service (0x16b). Если лимит расписания исчерпан, контракт переходит в режим ожидания и выставляет флаг сбоя для ручного перезапуска владельцем.
Какие задачи решает
- настроить вызовы
IAxelarGatewayи оплату газа черезIAxelarGasService - собрать приёмник на базе
AxelarExecutableс проверкой адреса отправителя - изолировать транспортные контракты моста от прикладной логики исполнения
- связать межсетевую отправку с системным планировщиком Hedera (
0x16b)
Примеры запросов агенту
- Напиши контракт отправителя Axelar GMP на Hedera с предварительной оплатой газа
- Создай контракт приёмника на базе AxelarExecutable с проверкой адреса в нижнем регистре
- Настрой оркестратор с планировщиком HSS (0x16b) для регулярной отправки сообщений в EVM
Как установить axelar-gmp
1Через Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-code2Вручную: положить файлы
~/.claude/skills/axelar-gmp/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/axelar-gmp/
1Через Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a codex2Вручную: положить файлы
.agents/skills/axelar-gmp/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a cursor2Вручную: положить файлы
.cursor/skills/axelar-gmp/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hedera-dev/hedera-skills axelar-gmp2Вручную: положить файлы
.github/skills/axelar-gmp/SKILL.md1Через Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a gemini-cli2Командой платформы
gemini skills install https://github.com/hedera-dev/hedera-skills --path plugins/cross-chain/skills/axelar-gmpВручную: положить файлы
.devin/skills/axelar-gmp/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о axelar-gmp
Как установить axelar-gmp в Claude Code?
Выполните команду npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-code. Файл будет сохранён по пути ~/.claude/skills/axelar-gmp/SKILL.md.
Что делает скилл axelar-gmp?
Он предоставляет готовые шаблоны и правила взаимодействия смарт-контрактов Hedera с EVM-сетями через шлюз Axelar GMP и системный сервис расписаний Hedera.
Почему нельзя использовать числовой chain ID в шлюзе?
Протокол Axelar маршрутизирует сообщения по строковым идентификаторам сетей. Передача числового идентификатора вместо строки вроде "hedera" приведёт к ошибке выполнения транзакции.
Исходный текст
SKILL.md · Apache-2.0
---
name: axelar-gmp
description: >
Axelar General Message Passing (GMP) on Hedera. Use when sending or receiving cross-chain
contract calls via Axelar Gateway (callContract, payNativeGasForContractCall), building
AxelarExecutable receivers, wiring Hedera↔EVM destinations, or separating bridge transport
from destination handlers (orchestrated / scheduled flows).
---
# 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
| Piece | Role |
| ----- | ---- |
| `IAxelarGateway` | `callContract(destChain, destAddress, payload)` |
| `IAxelarGasService` | `payNativeGasForContractCall{value}` before the gateway call |
| `AxelarExecutable` | Destination base; override `_execute(...)` |
| Chain names | Axelar string IDs — e.g. `"hedera"`, `"ethereum-sepolia"` (not numeric chain IDs) |
| Addresses | EVM string form of the peer contract (checksummed `0x…`) |
See [references/hedera-axelar.md](references/hedera-axelar.md) for chain-name conventions and SDK imports. See [references/examples.md](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
| Side | Guard |
| ---- | ----- |
| Source sender | Only `authorizedCaller` (orchestrator) may `send` |
| Destination receiver | Validate `srcChain` + `srcAddress` (case-insensitive) before handling |
| Destination handler | Only 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
- [references/examples.md](references/examples.md) — sender / receiver / allowlist sketches
- [references/hedera-axelar.md](references/hedera-axelar.md) — chain names vs IDs, SDK imports
- [Axelar GMP overview](https://docs.axelar.dev/dev/general-message-passing/overview)
- [axelar-gmp-sdk-solidity](https://github.com/axelarnetwork/axelar-gmp-sdk-solidity)
© hedera-dev · Apache-2.0 · hedera-dev/hedera-skills