@axelar-network/axelar-gmp-sdk-solidity

中文文档
6.2.0发布于 2026/06/04MITCommonJS零依赖近 30 天下载 8万

Solidity GMP SDK and utilities provided by Axelar for cross-chain development

原始使用文档
文档目录11 节
  1. Documentation
  2. Build
  3. Development
  4. Available contracts
  5. AxelarExecutable
  6. AxelarExpressExecutable
  7. Create2Deployer and Create3Deployer
  8. Proxy and Upgradable
  9. AddressString
  10. AddressBytes
  11. Bytes32String

Axelar GMP SDK Solidity

This repository contains all the necessary ingredients for successful cross-chain development utilizing the Axelar General Message Passing protocol.

Documentation

Build

We recommend using the latest Node.js LTS version.

npm ci

npm run build

npm run test

Pre-compiled bytecodes can be found under Releases. Furthermore, pre-compiled bytecodes and ABI are shipped in the npm package and can be imported via:

npm install @axelar-network/axelar-gmp-sdk-solidity
const IAxelarExecutable = require('@axelar-network/axelar-gmp-sdk-solidity/interfaces/IAxelarExecutable.json');

const Upgradable = require('@axelar-network/axelar-cgp-solidity/artifacts/contracts/upgradable/Upgradable.sol/Upgradable.json');

Unit tests can also be run against live networks for integration testing, see here.

Development

Check gas usage

REPORT_GAS=true npm run test

Check storage layout of contracts.

STORAGE_LAYOUT=true npm run check

Check contract bytecode size

CHECK_CONTRACT_SIZE=true npm run build

Available contracts

AxelarExecutable

Base interface for validating and executing GMP contract calls.

AxelarExpressExecutable

Interface that allows expediting GMP calls by lending assets and performing execution before it fully propagates through the Axelar network.

Create2Deployer and Create3Deployer

These contracts are used to deploy your Executable to have the same address on different EVM chains. This simplifies message validation from peer Executables. You can learn more in the documentation.

Proxy and Upgradable

Base implementation of upgradable contracts designed to be deployed with Create3Deployer and to have the same Proxy address on different EVM chains.

AddressString

Allows conversion between string and address data types

AddressBytes

Allows conversion between bytes and address data types

Bytes32String

Allows conversion between string and bytes32 data types for storing strings under 31 bytes into a single storage slot

版本与发布记录

@axelar-network/axelar-gmp-sdk-solidity 共发布 56 个版本,首次发布于 2022/08/21;过去 12 个月发布了 2 个版本。

版本发布日期距今
6.2.0latest2026/06/045 个月前
6.1.02026/05/135 个月前
6.0.62025/02/271.7 年前
6.0.52025/02/251.7 年前
0.0.0-snapshot.aab7a4esnapshot2025/02/171.7 年前
0.0.0-snapshot.caeff042025/02/131.7 年前

关于 @axelar-network/axelar-gmp-sdk-solidity 的常见问题

@axelar-network/axelar-gmp-sdk-solidity 是什么?

Solidity GMP SDK and utilities provided by Axelar for cross-chain development

如何安装 @axelar-network/axelar-gmp-sdk-solidity?

在项目目录运行 npm install @axelar-network/axelar-gmp-sdk-solidity,或使用 pnpm add / yarn add / bun add。

@axelar-network/axelar-gmp-sdk-solidity 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/axelar-network__axelar-gmp-sdk-solidity 是否存在。

@axelar-network/axelar-gmp-sdk-solidity 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@axelar-network/axelar-gmp-sdk-solidity 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@axelar-network/axelar-gmp-sdk-solidity 可以商用吗?

@axelar-network/axelar-gmp-sdk-solidity 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@axelar-network/axelar-gmp-sdk-solidity 的下载量有多少?

根据 npm 官方下载统计,@axelar-network/axelar-gmp-sdk-solidity 在 2026/10/08 – 2026/11/06 这 30 天内被下载 79,612 次,日均约 2,654 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@axelar-network/axelar-gmp-sdk-solidity 还在维护吗?

最新版本 6.2.0 发布于 2026/06/04(5 个月前);至今共发布 56 个版本,其中过去 12 个月发布了 2 个;首次发布于 2022/08/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。