nitor-infotech-oss/parity-substrate-interface

使用此包,您可以使用功能与运行中的 substrate 节点进行交互。

dev-main 2022-01-17 14:04 UTC

This package is not auto-updated.

Last update: 2024-10-01 21:13:12 UTC


README

我们实现了可以帮助使用函数通过表面接口进行通信的包。

预算在这里

Issue

克隆包

git clone https://github.com/nitor-infotech-oss/parity-substrate-interface.git

安装

您可以通过 composer 安装此包

composer require nitorInfoTechOss/substrate-interface-package

创建测试环境步骤

  1. 创建测试文件夹并创建一个用于测试代码的 PHP 文件

  2. 运行命令 "touch composer.json"

  3. 尝试运行以下代码。

用法(就像)

$testClass = new SubstrateInterface("http_url");
echo $testClass->rpc->system->name();

测试

vendor/phpunit/phpunit/phpunit

运行测试用例

I] 克隆项目 git clone https://github.com/neha0921/substrate-interface-package.git

II] 更新 composer composer Update

III] 检查测试用例,运行以下命令

vendor/bin/phpunit

例如:

  1. vendor/bin/phpunit --filter testSystemName

  2. vendor/bin/phpunit --filter testRpcMethods

变更日志

请参阅 CHANGELOG 了解最近更改的更多信息。

贡献

请参阅 CONTRIBUTING 了解详细信息。

许可

MIT 许可证(MIT)。请参阅 许可文件 了解更多信息。