forecho/web3
Composer 安装命令:
composer require forecho/web3
包简介
A PHP library for interacting with Ethereum
README 文档
README
PHP Ethereum ABI Encoder/Decoder
Install
Then
composer require forecho/web3
Usage
Encode
use Web3\Contracts\Ethabi; use Web3\Contracts\Types\Address; use Web3\Contracts\Types\Boolean; use Web3\Contracts\Types\Bytes; use Web3\Contracts\Types\DynamicBytes; use Web3\Contracts\Types\Integer; use Web3\Contracts\Types\Str; use Web3\Contracts\Types\Uinteger; $abi = new Ethabi([ 'address' => new Address(), 'bool' => new Boolean(), 'bytes' => new Bytes(), 'dynamicBytes' => new DynamicBytes(), 'int' => new Integer(), 'string' => new Str(), 'uint' => new Uinteger(), ]); $abi->decodeParameter('uint', '0x0000000000000000000000000000000000000000000000000000000000000001'); // 1 $abi->decodeParameter('address', '0x0000000000000000000000000000000000000001'); // '0x0000000000000000000000000000000000000001'
License
MIT
统计信息
- 总下载量: 409
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-21