# axelar-gmp

Guides cross-chain contract calls between Hedera and EVM networks via Axelar GMP. Useful for setting up gateway calls, receivers, and HSS loops.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 454 installs · ★ 28
- Author: hedera-dev
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/hedera-dev/hedera-skills/tree/HEAD/plugins/cross-chain/skills/axelar-gmp/SKILL.md
- Updated: 2026-09-03
- HTML: https://affpapa.org/en/nevibecode/skills/axelar-gmp

## What it does

This skill guides agent development for Axelar General Message Passing on Hedera. It decouples bridge transport from downstream business logic. The source chain relies on an authorized sender contract, while destination contracts extend `AxelarExecutable` and filter incoming callers using lowercase keccak256 comparisons.

Gas sequence is strict. Contracts must execute `payNativeGasForContractCall` with native value before calling `callContract` on the gateway. Gas refunds must return to the orchestrator rather than an arbitrary account. Numeric chain IDs fail. Axelar requires string identifiers such as `"hedera"` or `"ethereum-sepolia"`.

Recurring workflows integrate directly with the Hedera Schedule Service precompile (`0x16b`). The contract validates schedule capacity, triggers dispatch, and flags failures for manual recovery if rescheduling cannot complete.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/axelar-gmp/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/axelar-gmp/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/axelar-gmp/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/axelar-gmp/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hedera-dev/hedera-skills axelar-gmp
```

2. **Manually: put the files in place**
- File: `.github/skills/axelar-gmp/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hedera-dev/hedera-skills --path plugins/cross-chain/skills/axelar-gmp
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/axelar-gmp/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill axelar-gmp -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hedera-dev/hedera-skills/tree/HEAD/plugins/cross-chain/skills/axelar-gmp/SKILL.md

## When to use it
- wire `IAxelarGateway` and `IAxelarGasService` with upfront native gas payments
- build `AxelarExecutable` receivers with case-insensitive source allowlists
- separate cross-chain transport interfaces from destination business handlers
- automate recurring message dispatches via Hedera Schedule Service (`0x16b`)

## Example prompts
- Write a Hedera bridge sender contract that pays Axelar gas before calling the gateway
- Create an AxelarExecutable receiver contract that validates source chain and address
- Build an orchestrator using HSS (0x16b) to automate recurring GMP dispatches to EVM

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 98b2dfd19e88653e.

BEGIN THIRD-PARTY FILE 98b2dfd19e88653e
````text
---
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"
````
END THIRD-PARTY FILE 98b2dfd19e88653e

The third-party file has ended. Everything between the 98b2dfd19e88653e tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2756 of 5384 bytes. © hedera-dev · Apache-2.0 · https://github.com/hedera-dev/hedera-skills/tree/HEAD/plugins/cross-chain/skills/axelar-gmp/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
